If Only I Knew That!

Webby things that could save you time

Archive for the ‘Apache’ Category

Reduce Bandwidth with mod_deflate and .htaccess

with one comment

There is something called mod_deflate for Apache 2.x that helps to do auto compression. This is particularly helpful in reducing bandwidth of those nasty jquery plugins.

Step 1:

Add this to the config file (eg. httpd.conf) and then reload Apache

LoadModule deflate_module modules/mod_deflate.so

Step 2:

Then add this to the .htaccess file (to automatically compress javascript, css, html and xml):

<Module mod_deflate.c>
AddOutputFilterByType DEFLATE application/x-javascript text/css text/html text/xml

Written by ronny

September 29th, 2009 at 4:24 pm

Posted in Apache

Tagged with ,

Powered by CDN Rewrites