|File||File size||Gzipped file size|
|Original jQuery library||62,885 bytes||19,758 bytes|
|jQuery minified with JSMin||36,391 bytes||11,541 bytes|
|jQuery minified with Packer||21,557 bytes||11,119 bytes|
|jQuery minified with the YUI Compressor||31,822 bytes||10,818 bytes|
These results are amazing! The smallest file is the file obtained by minifying jQuery using the YUI Compressor and then gzipping. I would have thought that using Packer would have yielded the smallest file. In fact, it appears that Packer’s redundancy reduction algorithm is detrimental to gzip compression.
If your web hosting company does not offer HTTP compression, but gives you access to PHP (that’s the case of Yahoo! Web Hosting), I wrote a simple PHP script that will compress files and set the cache control headers so that the requested files actually get cached by the browser. I used this script with great success for a web site I worked on recently: http://www.okomis.com/
Note: yahoo-dom-event.js, minified with the YUI Compressor and gzipped only weighs 9,476 bytes. Not bad!