Enable compression using mod deflate in linux websites

by rajesh 2012-08-28 18:46:45

If mod deflate is enabled in the server and you wish to enabled compression for css and javascript, add the following lines in .htaccess file

AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript


The following lines will enable compression in txt, html, xml, rss and xhtml files..

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
882
like
0
dislike
0
mail
flag

You must LOGIN to add comments