Which one is the best Javascript minifier?
If you are using PHP you might also want to take a look at minify which can minify and combine JavaScript files. The integration is pretty easy and can be done by defined groups of files or an easy query string. Minified files are also cached to reduce the server load and you can add expire headers through minify.
There are several you can use/try:
- YUI compressor
- jsmin
- Microsoft Ajax minifier (has hypercrunching)
Sometimes i use this: http://closure-compiler.appspot.com/home
I've used YUI Compressor for several projects and it's always worked perfectly: http://developer.yahoo.com/yui/compressor/
Google Closure Compiler generally achieves smaller files than YUI Compressor, particularly if you use the advanced mode, which looks worryingly meddlesome to me but has worked well on the one project I've used it on: http://code.google.com/closure/compiler/