我有一个带缓存问题的WordPress网站。我正在使用WordPress版本4.9.2。
我通过我的.htaccess文件使用gzip压缩,如GTMetrix推荐的那样,WordPress插件WP Fastest Cache的版本为0.8.7.6,我也使用版本1.4.2安装了高级扩展。
在使用GTMetrix分析我的site时,它说我应该为8个组件启用gzip压缩。 5由WP Fastest Cache和3创建的缩小文件是Revolution Slider的文件。
我想知道为什么WP Fastest Cache创建的缩小文件不是gzip压缩的。我做错了什么,如何压缩这些文件呢?
如果需要,以下是我的WP最快缓存设置:
如果需要,请输入我的gzip .htaccess代码:
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
# Remove browser bugs (only needed for really old browsers)
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent
</IfModule>