Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any recommendations for a CSS minifier? [closed]

Tags:

css

minify

People also ask

What does a CSS Minifier do?

Minifying a CSS file implies the removal of unnecessary characters in the source code to reduce the file size and facilitate faster loading of the site. When a user requests a webpage, the minified version is sent instead of the full version, resulting in faster response times and lower bandwidth costs.

Why we should minify front end codes?

Minification dramatically improves site speed and accessibility, directly translating into a better user experience. It's also beneficial to users accessing your website through a limited data plan and who would like to save on their bandwidth usage while surfing the web.

How do I minify a file?

To minify CSS, try CSSNano and csso. To minify JavaScript, try UglifyJS. The Closure Compiler is also very effective. You can create a build process that uses these tools to minify and rename the development files and save them to a production directory.


The YUI Compressor is fantastic. It works on JavaScript and CSS. Check it out.


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).

UPDATE 2011: And it's now available via NuGet also :)


I like Minify. In PHP and works with CSS or JavaScript.


CSSO is currently best minifier/optimizer.