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.
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.
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:-
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With