Last month I set out to see how far I could compress the CF8 JavaScript files. As many have come to find out, the YUI, Ext and Spry JS files can be rather large and I wanted to bring them down as much as possible.
As I was reading Ajaxian today, I saw a post about a new compressor called YUI Compressor which is a Java-based application which helps to greatly minify your JavaScript code. In speaking to my friend Tane Piper, he told me that he saw *amazing* results when he used it against his jQuery plugins. So I had to give this a shot against the CF8 files.
I immediately tried it against Spry's largest file, SpyData.js, and here were my results:
SpryData.js uncompressed: 126k
SpryData.js minified: 66k
Woah! Almost a 50% reduction in size.
I then tried it against the Dojo ShrinkSafe version of SpyData.js that I had created last month:
SpryData.js compressed with ShrinkSafe: 72k
SpryData.js minified: 64k
Wow, even more reduction if I run through the file through ShrinkSafe first!
I did try this on the Ext-All.js file and also saw a reduction of 30k in an already compressed file!
This is really a good utility to have and the results are outstanding. I would say to use this in conjunction with another packer and some http compression for really boosting performance on your web apps.
*** NOTE: If you're going to use this, please be sure to backup your existing CF8 JavaScript files just in case something doesn't work as expected.