Minify 1 vote

Minify is a PHP5 app that helps you follow several of Yahoo!'s Rules for High Performance Web Sites.

It combines multiple CSS or Javascript files, removes unnecessary whitespace and comments, and serves them with gzip encoding and optimal client-side cache headers.

The design is somewhat similar to Yahoo's Combo Handler Service, except that Minify can combine any local JS/CSS files you need for your page.

Features

  1. Combines and minifies multiple CSS or JavaScript files into a single download
  2. Uses an enhanced port of Douglas Crockford's JSMin library and custom classes to minify CSS and HTML
  3. Caches server-side (files/apc/memcache) to avoid doing unnecessary work
  4. Responds with an HTTP 304 (Not Modified) response when the browser has an up-to-date cache copy
  5. Most modules are lazy-loaded as needed (304 responses use minimal code)
  6. Automatically rewrites relative URIs in combined CSS files to point to valid locations
  7. With caching enabled, Minify is capable of handling hundreds of requests per second on a moderately powerful server.
  8. Content-Encoding: gzip, based on request headers. Caching allows it so serve gzipped files faster than Apache's mod_deflate option!
  9. Test cases for most components
  10. Easy integration of 3rd-party minifiers
  11. Separate utility classes for HTTP encoding and cache control