Minify is a PHP5 app that can combine multiple CSS or Javascript files, compress their contents (i.e. removal of unnecessary whitespace/comments), and serve the results with HTTP encoding (gzip/deflate) and headers that allow optimal client-side caching.
Yahoo’s Combo Handler and Google’s AJAX Libraries API both serve content from their heavy-duty CDNs and potentially increase the chance that your visitor will already have a file in her browser cache. Neither service serves custom content that you provide. You may wish to use these services to serve popular libraries and Minify to serve your code.
Minify is distributed under the New BSD License, which means that you’re free to use, modify, and redistribute Minify or derivative works thereof, even for commercial purposes, as long as you comply with a few simple requirements. See the License file for details.
Requirements: -
Demo: http://code.google.com/p/minify/
License: New BSD License





And what about Yui Compressor ?
http://developer.yahoo.com/yui/compressor/
[...] Minify – Combine & Compress CSS or Javascript Files [...]
[...] : WebAppers Entassé dans WebDev et griffonné bande passante, css, javascript, php. Suivre les commentaires [...]
I have been using Minify for a while now…and it is great! I definitely recommend it. Use the groups feature to combine all your JavaScript files into one download.
[...] de Minify en Google Code Fuente: WebAppers Difunde esta [...]
[...] Minify. Combina y comprime ficheros CSS o JavaScript. vía: WebAppers [...]
We’ve tried CSSTidy here in the office and we love it. We have been looking for something similar for PHP and we’ll give minify a try. thank for this.
@Angelo – there is a cssTidy php class
csstidy.sourceforge.net/usage.php
Its nice to be able to use minify to crush n’ combine both (into sets a single script and sheet)
@Dreur – YUI can’t be used on-the-fly
I think the next step is to allow minify to retain License comments. EG swfobject, dojo, jquery etc so that License stipulations are adhered to and http requests reduced to minimum.
FAYI
Minify retains /*! comments such as this */. It works like a charm.
Also it applies prefixes to CSS URLs too – I am yet to see this in action, a great idea. And plans are underway to intergrate into apache and bypass php altogether.
I am so happy I found webappers! Minify will be a great addition to my development process.
There is another web tool to minify, merge, and compress your CSS/JS code – Web Optimizer ( http://code.google.com/p/web-optimizator/ ). It’s also free and more powerful than Minify.
RSS feed for comments on this post · TrackBack URI