Segui skydiamond.org anche su Twitter
 
You are here: Sky ForumWebSviluppo webJavascriptComprimere gli script JS
: [1]
Comprimere gli script JS
Comprimere gli script JS
« : June 13, 2008, 12:27:52 am »

Ho trovato un post interessante che vi giro:

Quote
Some ajax sites have to load lot's of javascript, and it might be spoiling your visitor's viewing experience (especially if they use dial-up).

You can compress you javascript easily, and it can be from just removing whitespace, removing empty lines, removing comments, to renaming variables, rewriting your code, and obfuscation.

So how to get started.

Many javascript compressors use regex based systems, or sometimes they strip all newline characters-which could be a problem if you do not use semicolons on every line.
For the best result, I start out with dojo shrinksafe http://dojotoolkit.org/docs/shrinksafe which compresses your variables (eg. var somerandomlongvariablename; to var _33; and automatically adds semicolons. for compression, it also removes comments etc.

Then you should try using something like javascriptcompressor.com or http://dean.edwards.name/packer/ (enable base64 encode, and if you want- you can try shrink variables)
: [1]
You are here: Sky ForumWebSviluppo webJavascriptComprimere gli script JS
: