0
我努力讓自己在XAMPP Gzip壓縮工作,現在這是我的.htaccessApache的mod_deflate模塊不壓縮JavaScript/CSS
<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文件。有人知道爲什麼如何解決這個問題? (如果它甚至可能)
'mod_deflate'安裝並啓用? – KingCrunch
Jup,正如我所說的,壓縮工作的HTML文件,但沒有別的 – Crinsane
的JavaScript和CSS文件的MIME類型的Apache報告匹配你正在添加的類型? –