【发布时间】:2014-10-19 09:49:41
【问题描述】:
我在保存在服务器根目录中的.htaccess 文件中使用以下代码来启用gzip 压缩。但是,javascript 没有被压缩。
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml text/javascript application/x-javascript application/x-httpd-php
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
如何启用 javascript 的压缩?我检查了 mod_deflate 是否已启用并且索引页面正在被压缩。 我的网站托管在here。
【问题讨论】:
标签: apache compression gzip