Thread: JS Compressor
View Single Post
Old 11-20-2007, 12:11 AM   #2 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

All JS compresses do is remove all the white space - it's all they can do. In the long run, if you're creating large Javascript files then Prototype will be able to shave a lot off of the file sizes due to the short-handed ways of writing the code. Such as $() instead of document.getElementById().

If you want to be your own Javascript compressor then once you're done, please all your Javascript on one huge line - of course keep another version that is formatted in a drop dead gorgeous way so that you can easily edit it. The good thing about Javascript is that it doesn't need the semi-colons at the end of each line, unlike PHP, and so removing those for each line will save you countless bytes!
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote