Easy things first! As you know, I have a back log of posts that I have to dump out of my brain into this blog. I will start with the easiest.
YUI Compressor. This is a freeware from YUI. I was looking at the MultiThreading in JS post in infoq.com and found that this Concurrent.Thread.js is around 500KB. Which is quite big for a js file. And imagine the poor vistor of my site from Bugaria on a dialup with 56 Kbps line, This page is as good as a download! So, What can be done? 1. Compress the JS, 2. Then Gzip the data transfer. Well The second option might not be in *your* hands as a developer, the first is always your decision.
Using YUI is absolutely easy. Download the jar file and run
And you got a compressed and obfuscated file (would you not want this! The users can no longer steal your js code!). You can also do this to your CSS files. There are other compressors like dojo, JsMin but this one beats them all.
YUI Compressor. This is a freeware from YUI. I was looking at the MultiThreading in JS post in infoq.com and found that this Concurrent.Thread.js is around 500KB. Which is quite big for a js file. And imagine the poor vistor of my site from Bugaria on a dialup with 56 Kbps line, This page is as good as a download! So, What can be done? 1. Compress the JS, 2. Then Gzip the data transfer. Well The second option might not be in *your* hands as a developer, the first is always your decision.
Using YUI is absolutely easy. Download the jar file and run
java -jar yuicompressor.jar myjsfile.js
And you got a compressed and obfuscated file (would you not want this! The users can no longer steal your js code!). You can also do this to your CSS files. There are other compressors like dojo, JsMin but this one beats them all.