Web Developer Training: Compression

Posted by Phil on July 30, 2008 under Training Sessions, Web Development | 3 Comments to Read

web-developer-training-compression

I may be jumping the gun here, but I thought I’d post the training a day early.  Yes that’s right, I have another training session that may be of interest.  This one has to do with gzip/deflate and various js compression engines (JSMin, PACKER, and YUI).  I may have thrown some other things in there, but I wrote most of this last week, so I can’t really remember :) .

Let me know if there are bugs to be fixed, or if you have anything you’d like to add.

Web Developer Training: Compression

JS Compressors

Posted by Phil on February 20, 2008 under Javascript | Be the First to Comment

So Jason found that one of the compressed versions of prototype we were using was causing some function to not work. The prototype file in question had been shrinked using ShrinkSafe, which is based on Rhino, and is actually made by dojo (I figured since IBM has a dark-alliance with dojo, it’d work fairly well with Websphere. Needless to say, ShrinkSafe is well… crap. So here is what you should use instead.

*Now I didn’t link to the jsmin or to YUI because they could be updated, and they are files you run locally on your box while /packer/ is a copy-paste web-util.

In my opinion YUI is the best, you can choose several different compression levels and it works very well compressing prototype, so well in fact that we got it to shrink down an extra 10k than what had been done with  ShrinkSafe.  Also the YUICompressor is semi-intelligent with whitespace, it checks for ascii characters before and after a piece of whitespace to know if it should remove it.