javascriptcssoptimizationjscompress

What are some good css and js minimizers for production code?


I'm looking for some applications or websites that minimize css and js files. Ideally, they could batch them all or if not, one at a time.


Solution

  • YUI Compressor does both JavaScript and CSS. I'm not sure if you can send it a batch of files.

    You can batch process at YUI Compressor Online (yui.2clics.net), though that version only accepts JavaScript. Another Online YUI Compressor (refresh-sf.com) accepts CSS, too, but doesn't batch.

    In terms of comparing the various minifiers, see jQuery : Frequently Asked Questions (FAQ) : How do I compress my code? Also, check out Microsoft Ajax Minifier.

    jQuery has switched from the YUI Compressor to Google's Closure Compiler for the minified version that they distribute.