Online Tool compares Packer, JSMin, Dojo, and YUI Compressor

I found this sweet online tool called CompressorRater that compresses javascript using all the top compression engines around, and it provides really detailed results.. Its a great example of an online tool as well.. Discuss it.

Try it out a few times and see which compression engine works the best for you.. I've been compressing my javascript for years and It translates into much faster rendering and faster connections. Automate it like I do. I've used Dojo/Shrinksafe powered by Rhino. for awhile, but its always nice to see if something else works better.. let me know what works the best for you guys.

CompressorRater Logo

Arthur Blake

There are many tools available that can help you compress your JavaScript code but it can be time consuming and difficult to analyze which tool works the best for a given situation. This web application shows aggregated statistics on the general level of compression in all these tools, and allows developers to easily play with and compare the different tools on their own JavaScript code without having to set up all the tools on their own.

Javascript Input

CompressorRator Output

Javascript Compression Options

The following compression tools are compared, both with and without the affects of additional gzip compression that are supported natively by modern web browsers.

  • JSMin is a conservative compressor, written several years ago by Douglas Crockford. It is considered safe (especially if you verify your code with JSLint first-- an excellent thing to do anyway) because it doesn't attempt to change any variable names.
  • Dojo shrinksafe is a very popular Java based JavaScript compressor that parses the JavaScript using the rhino library and crunches local variable names.
  • Packer by Dean Edwards, is also a very popular JavaScript compressor, that can go beyond regular compression and also add advanced on-the-fly decompression with a JavaScript runtime piece.
  • YUI Compressor is a newer compressor written by Julien Lecomte, that aims to combine the safety of JSMin with the higher compression levels acheived by Dojo Shrinksafe. Like Dojo shrinksafe, it is written in Java and based on the rhino library.