JS和CSS优化工具 Minify
openkk
12年前
Minify 是一个 PHP5 的应用,帮助你让网站更加符合 Yahoo 的:Rules for High Performance Web Sites.
Minify可以按需对JavaScript以及CSS文件进行合并、压缩以及缓存,以加快页面的载入速度。而安装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
Before | |
After |