Browser issues with Gzip.


Many times it was reported that Gzip creates browser issues. Not all browsers/some old browsers support Gzip and how to override/fix this? With a simple thing, we are able to fix it instantly. So, please be with me.

I would add these following lines at the bottom of the .htaccess file and I will save the file. After that, I would “purge/delete all cache”, if there’s any caching plugin installed (that “purge/delete all cache” option is provided by that cache plugin) and I would clear the browser cache from “all-time”. I will not see these issues anymore.

These are the lines to add,

<IfModule mod_deflate.c>
    SetOutputFilter DEFLATE
    <IfModule mod_setenvif.c>
        BrowserMatch ^Mozilla/4 gzip-only-text/html
        BrowserMatch ^Mozilla/4\.0[678] no-gzip
        BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
        SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
    </IfModule>
    <IfModule mod_headers.c>
        Header append Vary User-Agent env=!dont-vary
    </IfModule>
</IfModule>

Question: What if those lines above didn’t fix that issue? Then, these are the lines below to add instead of the lines above. So, it says I would never add them both. It meant, if I added those lines above, then I would not add the lines below or if I added the lines below, I would not add the lines above.

<IfModule mod_deflate.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent
</IfModule>

Time for music. All the best.

Leave a Reply

Your email address will not be published. Required fields are marked *