Agile Web Application Development with Yii 1.1 and PHP5Picture 9When a Web project is finished, it is time to think how to make it better, faster… how to improve user’s experience. One of the most important things is javascript code compression in order to speed up page downloads and there are a couple of tools around that allows us to do it.

I just include three references:

The Online YUI Compressors

These tools allows us to make use of the famous Yahoo Javascript Compression algorithm. Both of the above references does the same results, there is only a major difference between both: whilst the one created by Mike allows you to paste your script or upload a file to compress, the one created by Rodolphe Stoclin only allows us to upload the file to compress.

The Online Javascript Minifier

This tool can reduce our code by using two different algorithms: the JSMin by David Crockford and the Packer method by Dean Edwards.

Which One to Use?

I personally like those algorithms that do not make any use of the eval function and doesn’t change much the code I program, test, and implement. I think that will only depend of the developer choice.

There is an online tool that help us compare the algorithms. If that helps you to decide which one to use: http://compressorrater.thruhere.net/



Tweet this!Tweet this!