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

拈花ヽ惹草 提交于 2019-11-27 11:13:19

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.

YUI Compressor is pretty cool. You can run it as part of a build process from the command line

Take a look at The JavaScript CompressorRater. It does live comparisons of various minifiers (with and without gzip compression) for any JavaScript you supply it.

It also (mostly) works with CSS, though not all minifiers support it and not even all of those that do (e.g. YUI) show up correctly in the comparison table.

Microsoft released their Microsoft Ajax Minifier on codeplex today. Includes an MS build task and everthing inside VS 2005/2008

I like this one from Yahoo: http://developer.yahoo.com/yui/compressor/

I use Packer by Dean Edwards for javascript.

There's also a .NET port of YUI Compressor which allows you to:-

  • intergrate the minification/file combining into Visual Studio post-build events
  • intergrate into a TFS Build (including CI)
  • if you wish to just use the dll's in your own code (eg. on the fly minification).
Biswanath

Basically what you are looking is to speed up your site by reducing the size of the response.

The other thing apart from minified js and css files is you can do a http compress. Please go through this and this.

If you don't mind using Perl as part of your build process, JavaScript:: and CSS::Minifier work pretty well.

you can try the free tools from Boryi

YUI compressor is great.

Another tool (and my weapon of choice due to its PHP-ness) is the PHP5-based Minify project hosted on Google code. If you're on a PHP platform consider it. Rather than running your stuff through a service after the fact, you install and configure this on your webserver once and then code and comment as much as you want and minify will rebuild (reminify) your CSS and/or Javascript on the fly. Yeah. I've used it, works great!!

http://code.google.com/p/minify/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!