Minify - Combine & Compress CSS or Javascript Files

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.

Minify - Combine & Compress CSS or Javascript Files

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.

Features

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

Requirements

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.

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

Share/Save/Bookmark

, , , ,

This post was written by:

Mike - who has written 254 posts on Open Source Resources for Designers & Developers | Greepit.com.


Leave a Reply