使用.htaccess提供没有文件扩展名的压缩文件

时间:2018-01-02 04:35:30

标签: .htaccess compression gzip webpagetest

我有一个网站聊天插件脚本,我已制作本地副本,并上传到我们的网站:www.example.com/js/default

webpagetest.org报告此文件未压缩。

在.htaccess中,我们有:

<IfModule mod_deflate.c>
AddType x-font/woff .woff
AddType x-font/ttf .ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE font/opentype font/ttf font/eot font/otf
</IfModule>

这还不足以压缩www.example.com/js/default吗?

如果没有,我们需要将哪些内容添加到.htaccess?感谢。

0 个答案:

没有答案