文档中说可以对pie.htc进行said压缩,但没有关于如何做的线索。现在,我如何对.htc文件进行gzip压缩,并让浏览器知道它是压缩的?(我记得,对.js文件也可以这样做。)
发布于 2013-03-26 20:26:04
最快的方法是只压缩服务器必须输出的所有内容。
apache:
<IfModule mod_gzip.c>
# Enable the module
mod_gzip_on yes
# Allow GZIP compression for all requests
mod_gzip_item_include mime .?
</IfModule>
# Method 2: Compress all content, manually excluding specified file types
<IfModule mod_deflate.c>
# place filter 'DEFLATE' on all outgoing content
SetOutputFilter DEFLATE
# exclude uncompressible content via file type
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png|rar|zip)$ no-gzip
<IfModule mod_headers.c>
# properly handle requests coming from behind proxies
Header append Vary User-Agent
</IfModule>
</IfModule>https://stackoverflow.com/questions/10469809
复制相似问题