Gzip compression
Author
Discussion

anonymous-user

Original Poster:

85 months

Friday 23rd April 2010
quotequote all
I found the following to deal with most file types :-

  1. BEGIN GZIP
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>
  1. END GZIP

But anything i find on the internet to add to the htaccess file for php pages doesn't seem to work?? Any ideas?

I have been using this page to test :-

http://www.gidnetwork.com/tools/gzip-test.php

TIA smile

anonymous-user

Original Poster:

85 months

Friday 23rd April 2010
quotequote all
Tried this :-

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/xml application/x-javascript text/css text/php
  1. The BrowserMatch is to disable compression
  2. on browsers that don’t handle it properly.
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

</IfModule>

An HTML page works fine but a PHP page still says no compression.