• Hello everyone, i´m having trouble getting my Gzip compression stable.

    My site is http://lenguajecorporal.org. I´ve got WordPress on Godaddy´s linux hosting and added this line of code:

    <?php if (substr_count($_SERVER[‘HTTP_ACCEPT_ENCODING’], ‘gzip’)) ob_start(“ob_gzhandler”); else ob_start(); ?>

    …to the very top of my header and main index. Last night I checked out in all these services:

    http://www.gidnetwork.com/tools/gzip-test.php
    http://www.whatsmyip.org/http-compression-test/
    http://checkgzipcompression.com/

    And every one of them (except Google Speed Test) determined I had GZIP enabled. Today, it´s gone, and I didn´t change anything :/

    Here´s my .htaccess file:

    # compress text, html, javascript, css, xml:
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
    AddType x-font/otf .otf
    AddType x-font/ttf .ttf
    AddType x-font/eot .eot
    AddType x-font/woff .woff
    AddType image/x-icon .ico
    AddType image/png .png
    AddType text/css .css

    <ifModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault “access plus 1 seconds”
    ExpiresByType text/html “access plus 1 seconds”
    ExpiresByType image/gif “access plus 2592000 seconds”
    ExpiresByType image/jpeg “access plus 2592000 seconds”
    ExpiresByType image/png “access plus 2592000 seconds”
    ExpiresByType text/css “access plus 604800 seconds”
    ExpiresByType text/javascript “access plus 216000 seconds”
    ExpiresByType application/x-javascript “access plus 216000 seconds”
    </ifModule>

    <ifModule mod_headers.c>
    <filesMatch “.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$”>
    Header set Cache-Control “max-age=2592000, public”
    </filesMatch>
    <filesMatch “.(css)$”>
    Header set Cache-Control “max-age=604800, public”
    </filesMatch>
    <filesMatch “.(js)$”>
    Header set Cache-Control “max-age=216000, private”
    </filesMatch>
    <filesMatch “.(xml|txt)$”>
    Header set Cache-Control “max-age=216000, public, must-revalidate”
    </filesMatch>
    <filesMatch “.(html|htm|php)$”>
    Header set Cache-Control “max-age=1, private, must-revalidate”
    </filesMatch>
    </ifModule>

    My site is cached through Sucuri.net´s CloudProxy.

    Thanks in advance!

  • The topic ‘Gzip compression misteriously disappears’ is closed to new replies.