Andy's Blog » » PHP 合并&压缩 CSS和JavaScript 之 minify

PHP 合并&压缩 CSS和JavaScript 之 minify

minify 是一个php开源项目,用于合并&压缩 CSS和JS文件,为网站提速,提升用户体验。

minify 详细功能介绍

* 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 (files/apc/memcache) 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: gzip, based on request headers. Caching allows it so serve gzipped 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

Incoming search terms:

Tags: minify, 压缩CSS, 压缩JS, 合并CSS, 合并JS

本文地址: http://blog.21andy.com/20100210/1662.html