views:

96

answers:

6

Which one is the best Javascript minifier?

A: 

YUI minifier

Skelton
A: 

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.

Kau-Boy
A: 

There are several you can use/try:

XIII
+1  A: 

Sometimes i use this: http://closure-compiler.appspot.com/home

Filipe Costa
+4  A: 

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/

Tim Down
Google CC simple mode also achieves smaller size than YUI, and it's safe as well
galambalazs
+1  A: 

http://github.com/mishoo/UglifyJS

Andreas Hofmann
Interesting. I hadn't seen that one before.
Tim Down