The site in question is goinnativerecords.com

I've got a basic shared hosting account and my website is a little heavy on the javascript so I decided to compress with gzip.

Contacted my hosting, they say that Apache on the server has mod_gzip enabled.

So I added the following to my local .htaccess (don't have access to the global).

<ifModule mod_gzip.c>
  mod_gzip_on Yes
  mod_gzip_dechunk Yes
  mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
  mod_gzip_item_include handler ^cgi-script$
  mod_gzip_item_include mime ^text/.*
  mod_gzip_item_include mime ^application/x-javascript.*
  mod_gzip_item_exclude mime ^image/.*
  mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>

Compression doesn't seem to work (I test with http://www.gidnetwork.com/tools/gzip-test.php).

I tried adding php_value output_handler ob_gzhandler To compress through php only, but still no dice. I also tried deflate with no luck..

Might someone hint me about what I'm doing wrong?

link|improve this question
feedback

1 Answer

Are you sure the server is actually loading the .htaccess? A quick test I usually do is throw some garbage text in there. If Apache starts producing 500's, you can be sure it's actually being used.

mod_gzip is actually pretty uncommon. Are you sure they weren't talking about mod_deflate? Try enabling that instead: https://httpd.apache.org/docs/2.0/mod/mod_deflate.html

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.