WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
Gzip compression not working (4 posts)

  1. csburdick
    Member
    Posted 1 year ago #

    Hi, I have "Enable HTTP (gzip) compression" enabled on everything within the plugin, but every optimization test I run says http compression is not enabled.

    Is W3TC not serving the gzipped files as it says it is?

    An example of one website doing this is http://www.automoblog.net

    Thank you!

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. MarkSina125
    Member
    Posted 1 year ago #

    Did you configured it properly or not?? if not follow this link and then you'll have any issues let me know.

    http://www.techiezone.net/tutorials/configure-w3-total-cache
    Thanks!

  3. csburdick
    Member
    Posted 1 year ago #

    I went through the article, and (although it's quite outdated,) yes I've set it up properly.

  4. SiteDesignUSA
    Member
    Posted 1 year ago #

    Hello.

    I had the same problem on my CentOs server and what I did (This is awhile ago) was

    1. cut out the text that W3tc adds to your .htaccess file (and save)

    2. Put the contents into my yoursite.conf fle

    3. Copy this and paste into your .conf file (at the bottom) ( I can't remember where I patched this solution from, but it works...)

    #BEGIN TJ custom cache
    
    <IfModule mod_deflate.c>
    # Insert filter
    SetOutputFilter DEFLATE
    
    # 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
    
    # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
    # the above regex won't work. You can use the following
    # workaround to get the desired effect:
    BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
    
    # Don't compress images and other stuff
        SetEnvIfNoCase Request_URI \.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|MPP|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SWF|TAR|TIF|TIFF|WAV|WMA|WRI|XLA|XLS|XLSX|XLT|XLW|ZIP)$ no-gzip dont-vary
    
    # Make sure proxies don't deliver the wrong content
    Header append Vary User-Agent env=!dont-vary
    </IfModule>
    
    #END TJ custom

    4. Uncheck the browser cache checkbox in the W3Tc setup

    5. Restart your apache server.

    OR.....

    Just paste this at the bottom of your .htaccess (I don't know if you're on shared hosting)

    #BEGIN TJ custom cache
    
    <IfModule mod_deflate.c>
    # Insert filter
    SetOutputFilter DEFLATE
    
    # 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
    
    # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
    # the above regex won't work. You can use the following
    # workaround to get the desired effect:
    BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
    
    # Don't compress images and other stuff
        SetEnvIfNoCase Request_URI \.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|MPP|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SWF|TAR|TIF|TIFF|WAV|WMA|WRI|XLA|XLS|XLSX|XLT|XLW|ZIP)$ no-gzip dont-vary
    
    # Make sure proxies don't deliver the wrong content
    Header append Vary User-Agent env=!dont-vary
    </IfModule>
    
    #END TJ custom

    W3TC tries to do the same thing but this calls Deflate directly. Try it and see if it works for you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic