问题
I'm using mod_deflate to compress my web pages but I see that only the HTML is compressed no compression for the css.
Documents (1 file) 4 KB (18 KB uncompressed)
http://localhost/web/ 4 KB (18 KB uncompressed)
Images (16 files) 96 KB
Objects (0 files)
Scripts (2 files) 26 KB (73 KB uncompressed)
http://code.jquery.com/jquery-1.4.2.min.js 24 KB (70 KB uncompressed)
http://localhost/web/js.js 2 KB
Style Sheets (1 file) 6 KB
http://localhost/web/css/style.css 6 KB
Total 132 KB (192 KB uncompressed)
My .htaccess looks like:
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>
Any suggestions? Thanks in advance.
回答1:
Ok I don't know how, this finally worked and the css became 2KB instead of 6KB. Thanks everybody for your help.
来源:https://stackoverflow.com/questions/3896976/mod-deflate-for-css-and-js