Posts Tagged server

Sample Configuration for mod_deflate

These conf settings will avoid compressing images (generally a bad thing) but will compress various text, xml, css and javascript files. This is better than minifying javascript because minified js must be decompressed by the client js and this is not as efficient as doing it with Apache’s mod_deflate. This goes in httpd.conf.
#
# Deflate conf
#
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no=gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

     

, ,

No Comments