E-com DevBlog Spider-ball-vacuum

30Jul/083

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

Print This Post Print This Post
20Feb/080

JS Compressors

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.

Print This Post Print This Post