0
votes

I set up GZIP Compression, it's working for css/js files, but not for html page.

Please help me troubleshoot.

Server have compression enabled, here are info.php stats related to compression:

_SERVER["HTTP_ACCEPT_ENCODING"]   gzip, deflate
Stream Wrapper    compress.zlib://
Stream Filter     zlib.inflate, zlib.deflate
Compiled Version  1.2.3
Linked Version    1.2.3

Here are the .htacess part:

# Insert filter on all content
SetOutputFilter DEFLATE
# Insert filter on selected content types only
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript

# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# Don't compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary

It is compressing css and js. Initially on google page insights test all css, js and page itself were showed as not compressed, now only page itself. Also here is the screenshot from firefox web developers tool.

What can be a problem? I am using magento ver 1.9 if it makes difference.

1

1 Answers

0
votes

For anybody with same question the problem was that hosting provider didn't enable "zlib.output_compression"

After enabling it the issue is solved.