Apache mod_deflate不会压缩javascript / css

时间:2012-06-13 07:09:34

标签: apache xampp mod-deflate

我正在尝试在xampp上进行Gzip压缩工作,现在这是在我的.htaccess中

<IfModule mod_deflate.c>

    AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
    AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
    AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype

</IfModule>

HTML文件被压缩,但JavaScript和CSS文件没有任何变化。谁知道为什么?如何解决这个问题? (如果可能的话)

1 个答案:

答案 0 :(得分:1)

好的......愚蠢的错误......浏览器仍然使用缓存版本......