资 源 简 介
Several shared web hosts do no support on-the-fly compression of content using mod_gzip or mod_deflate. One solution is to store pre-compresed versions of the files and serve them with the proper headers to war the browser that the content should be decompressed and used, not save on the drive as a gzip download.
Three issues arise with this method:
1. You need to keep the uncompressed code alongside the compressed code to accommodate browsers not support gzip compression.
1. For these visitors, it is desirable to serve a minified, packed, or better, a yui-compressed version of the code.
1. You also need to manage three times the amount of files: the source, the minified and the gzipped.
This utility command written in Perl is intended to help you manage pre-compressed files on servers not supporting mod_gzip.
Typical usage from the root directory of a web server is:
gzip-yui-encode.pl . -e js -e css -v -t