Jump to content

Gzip compression (mod_deflate) not working


php_nub_qq

Recommended Posts

I have just added, or tried to add, gzip compression to my website in order to make it faster. This is the code I have put into .htaccess

<IfModule mod_deflate.c>
#The following line is enough for .js and .css
AddOutputFilter DEFLATE js css
#The following line also enables compression by file content type, for the following list of Content-Type:s
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml
#The following lines are to avoid bugs with some browsers
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>

So now I'm using a firebug extension called PageSpeed to monitor gzip compression and it is not working. I also use http://gtmetrix.com/ and the results are the same. Can anyone explain to me what more I have to do to enable gzip compression? Big thanks!

Your .htaccess code is checking to see if this module has been loaded and then configuring how files are compressed. It is not loading the deflate module

 

You need to enable the deflate modue within the httpd.conf file. You do this by removing the # infront of this line

LoadModule deflate_module modules/mod_deflate.so

Save httpd.conf and restart Apache.

  On 10/14/2013 at 11:25 AM, Ch0cu3r said:

Your .htaccess code is checking to see if this module has been loaded and then configuring how files are compressed. It is not loading the deflate module

 

You need to enable the deflate modue within the httpd.conf file. You do this by removing the # infront of this line

LoadModule deflate_module modules/mod_deflate.so

Save httpd.conf and restart Apache.

 

Thank you for the reply #Ch0cu3r,

 

I'm using a hosting service and I have no access to httpd.conf. I will ask them if the module is available, but it is a very popular hosting company so I truly believe it is. I will post again if I'm right and the cause of the problem is still unknown.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.