WordPress.org

Forums

[Plugin: WP Super Cache] gzip message not displaying in footer (7 posts)

  1. hollywoodgrind
    Member
    Posted 5 years ago #

    I run Apache 2.2.3 on a Redhat Enterprise Linux 5 server, with WP Super Cache 0.9.6.1 running under WordPress 2.8.4.

    I have Cache and Super Cache enabled, Super Cache Compression enabled, and the following line in my .htaccess file, located in the root of the blog directory, to use the mod_deflate module in Apache:

    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/x-javascript application/x-httpd-php application/rss+xml application/atom_xml
    </IfModule>

    I also add to the root .htaccess file per the Super Cache instructions:

    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    AddDefaultCharset UTF-8
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{HTTP_user_agent} !^.*(Android|2.0\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|hiptop|IEMobile|iPhone|iPod|KYOCERA/WX310K|LG/U990|MIDP-2.0|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|Playstation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|Windows\ CE|WinWAP).*
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
    RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]
    
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{HTTP_user_agent} !^.*(Android|2.0\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|hiptop|IEMobile|iPhone|iPod|KYOCERA/WX310K|LG/U990|MIDP-2.0|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|Playstation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|Windows\ CE|WinWAP).*
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
    </IfModule>
    # END WPSuperCache

    In the /wp-content/cache/ directory I also have a .htaccess file with the following Super Cache recommended entry:

    # BEGIN supercache
    <IfModule mod_mime.c>
      <FilesMatch "\.html\.gz$">
        ForceType text/html
        FileETag None
      </FilesMatch>
      AddEncoding gzip .gz
      AddType text/html .gz
    </IfModule>
    <IfModule mod_deflate.c>
      SetEnvIfNoCase Request_URI \.gz$ no-gzip
    </IfModule>
    <IfModule mod_headers.c>
      Header set Cache-Control 'max-age=300, must-revalidate'
    </IfModule>
    <IfModule mod_expires.c>
      ExpiresActive On
      ExpiresByType text/html A300
    </IfModule>
    # END supercache

    When I view the source code of a page I only ever see the following message:

    <!-- Dynamic page generated in 0.131 seconds. -->
    <!-- Cached page generated by WP-Super-Cache on 2009-08-13 15:06:01 -->

    I can see the wp-cache of the article is created, and a corresponding index.html.gz file is created, but I never see a message saying Super Cache delivered the article gzipped.

    An article on my site that is supercached is:

    http://www.hollywoodgrind.com/sarah-palin-and-todd-palin-divorce-rumors-continue/

    Could someone take a look and see if they see the gzipped message from Super Cache?

    Am I missing something in the configuration? Should I be adding something to the httpd.conf file?

    Thank you.

  2. Donncha O Caoimh
    Member
    Posted 5 years ago #

    It doesn't show the gzip message any more. It's ok.

    Also, you should disable mod deflate. It gzips pages on every request without caching the gzipped content. The old mod_gzip plugin did that for Apache 1.3 but unfortunately it doesn't work with Apache 2.0.

  3. KenMorse
    Member
    Posted 5 years ago #

    It doesn't show the gzip message any more. It's ok.

    Thanks donncha -- I think the FAQ section of the 0.9.6.1 readme.txt file still talks about seeing the gzip message -- might be part of the confusion.

  4. hollywoodgrind
    Member
    Posted 5 years ago #

    The gzip message...

    <!-- Compression = gzip -->

    ... only shows up in the page source code when Hollywoodgrind.com is viewed with Mozilla Firefox, but not with Internet Explorer, or Chrome.

  5. Steven Vachon
    Member
    Posted 5 years ago #

    So, WP Super Cache compresses pages with g-zip when in "ON" mode (as opposed to "HALF ON")? The reason I ask is there is no "compression" option to enable/disable.

  6. Steven Vachon
    Member
    Posted 5 years ago #

    Nevermind. I don't know why, but for the longest time I couldn't see the "Super Cache Compression" header.

  7. Donncha O Caoimh
    Member
    Posted 5 years ago #

    KenMorse - I've just updated the FAQ to make it clearer, thanks!

    Compression is on by default when in HALF-ON mode as it's fairly reliable and works everywhere.

Topic Closed

This topic has been closed to new replies.

About this Topic