• Resolved BeoR4

    (@rr44)


    Hello,

    I am going mad. mod_expires is installed and running. I can see the cache-control headers coming through for html and css, set correctly to the w3 level of 3600 or a year in secs set in the plugin, but no cache header at all for images. I can see htaccess entries for image expiries, corresponding to the enablement in the plugin gui.

    Pasting htaccess below, not to diagnose, but to show that it seems to be have been setup correctly by the plugin.

    I had Autoptimise previously and that is deactivated. I also deactivate WP Cloudflare Super Page Cache just in case, but no difference

    <Files xmlrpc.php>
    <IfModule !mod_authz_core.c>
    order deny,allow
    deny from all
    allow from 192.168.0.10
    allow from 192.168.0.6
    </IfModule>
    <IfModule mod_authz_core.c>
    Require ip 192.168.0.10 192.168.0.6
    </IfModule>
    </Files>
    # END GOTMLS Patch to Block XMLRPC Access
    
    # BEGIN WP Cloudflare Super Page Cache
    # The directives (lines) between <code>BEGIN WP Cloudflare Super Page Cache</code> and <code>END WP Cloudflare Super Page Cache</code> are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    # END WP Cloudflare Super Page Cache
    # BEGIN W3TC Browser Cache
    <IfModule mod_mime.c>
        AddType text/css .css
        AddType text/x-component .htc
        AddType application/x-javascript .js
        AddType application/javascript .js2
        AddType text/javascript .js3
        AddType text/x-js .js4
        AddType text/html .html .htm
        AddType text/richtext .rtf .rtx
        AddType text/plain .txt
        AddType text/xsd .xsd
        AddType text/xsl .xsl
        AddType text/xml .xml
    </IfModule>
    <IfModule mod_expires.c>
        ExpiresActive On
        ExpiresByType text/css A31536000
        ExpiresByType text/x-component A31536000
        ExpiresByType application/x-javascript A31536000
        ExpiresByType application/javascript A31536000
        ExpiresByType text/javascript A31536000
        ExpiresByType text/x-js A31536000
        ExpiresByType text/html A3600
        ExpiresByType text/richtext A3600
        ExpiresByType text/plain A3600
        ExpiresByType text/xsd A3600
        ExpiresByType text/xsl A3600
        ExpiresByType text/xml A3600
    </IfModule>
    <IfModule mod_deflate.c>
        <IfModule mod_filter.c>
            AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon application/json application/vnd.ms-access video/webm application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.presentation application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint image/svg+xml application/x-shockwave-flash image/tiff application/x-font-ttf application/vnd.ms-opentype audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel
        <IfModule mod_mime.c>
            # DEFLATE by extension
            AddOutputFilter DEFLATE js css htm html xml
        </IfModule>
        </IfModule>
    </IfModule>
    <FilesMatch "\.(css|htc|less|js|js2|js3|js4|CSS|HTC|LESS|JS|JS2|JS3|JS4)$">
        FileETag MTime Size
        <IfModule mod_headers.c>
            Header set Pragma "public"
            Header append Cache-Control "public"
             Header unset Set-Cookie
             Header set X-Powered-By "W3 Total Cache/0.14.2"
        </IfModule>
    </FilesMatch>
    <FilesMatch "\.(html|htm|rtf|rtx|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|TXT|XSD|XSL|XML)$">
        FileETag MTime Size
        <IfModule mod_headers.c>
            Header set Pragma "public"
            Header append Cache-Control "public"
             Header set X-Powered-By "W3 Total Cache/0.14.2"
        </IfModule>
    </FilesMatch>
    <FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|webp|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|webm|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|_ttf|wav|wma|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EOT|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|WEBP|JSON|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|WEBM|MPP|OTF|_OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SVG|SVGZ|SWF|TAR|TIF|TIFF|TTF|TTC|_TTF|WAV|WMA|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW|ZIP)$">
        FileETag MTime Size
        <IfModule mod_headers.c>
             Header unset Set-Cookie
             Header unset Last-Modified
             Header set X-Powered-By "W3 Total Cache/0.14.2"
        </IfModule>
    </FilesMatch>
    <FilesMatch "\.(bmp|class|doc|docx|eot|exe|ico|json|mdb|webm|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|pot|pps|ppt|pptx|svg|svgz|swf|tif|tiff|ttf|ttc|_ttf|wav|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|BMP|CLASS|DOC|DOCX|EOT|EXE|ICO|JSON|MDB|WEBM|MPP|OTF|_OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|POT|PPS|PPT|PPTX|SVG|SVGZ|SWF|TIF|TIFF|TTF|TTC|_TTF|WAV|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW)$">
        <IfModule mod_headers.c>
             Header unset Last-Modified
        </IfModule>
    </FilesMatch>
    <IfModule mod_headers.c>
        Header set Referrer-Policy "no-referrer-when-downgrade"
    </IfModule>
    # END W3TC Browser Cache
    # BEGIN W3TC Page Cache core
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /
        RewriteCond %{HTTPS} =on
        RewriteRule .* - [E=W3TC_SSL:_ssl]
        RewriteCond %{SERVER_PORT} =443
        RewriteRule .* - [E=W3TC_SSL:_ssl]
        RewriteCond %{HTTP:X-Forwarded-Proto} =https [NC]
        RewriteRule .* - [E=W3TC_SSL:_ssl]
        RewriteCond %{HTTP:Accept-Encoding} gzip
        RewriteRule .* - [E=W3TC_ENC:_gzip]
        RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
        RewriteRule .* - [E=W3TC_PREVIEW:_preview]
        RewriteCond %{REQUEST_METHOD} !=POST
        RewriteCond %{QUERY_STRING} =""
        RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
        RewriteCond %{REQUEST_URI} \/$
        RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" -f
        RewriteRule .* "/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" [L]
    </IfModule>
    # END W3TC Page Cache core
    # BEGIN WordPress
    # The directives (lines) between <code>BEGIN WordPress</code> and <code>END WordPress</code> are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter BeoR4

    (@rr44)

    Many thanks indeed for any feedback anyone can give….

    I was trying to replace another plugin set and it’s not going well and my hair is falling out!

    Thread Starter BeoR4

    (@rr44)

    Active modules:

    I have no name!@d3a2c3ec81c6:/opt/bitnami/wordpress$ httpd -M
    Loaded Modules:
     core_module (static)
     so_module (static)
     http_module (static)
     mpm_prefork_module (shared)
     authn_file_module (shared)
     authn_core_module (shared)
     authz_host_module (shared)
     authz_groupfile_module (shared)
     authz_user_module (shared)
     authz_core_module (shared)
     access_compat_module (shared)
     auth_basic_module (shared)
     socache_shmcb_module (shared)
     reqtimeout_module (shared)
     filter_module (shared)
     deflate_module (shared)
     mime_module (shared)
     log_config_module (shared)
     env_module (shared)
     expires_module (shared)
     headers_module (shared)
     setenvif_module (shared)
     version_module (shared)
     proxy_module (shared)
     proxy_connect_module (shared)
     proxy_ftp_module (shared)
     proxy_http_module (shared)
     proxy_fcgi_module (shared)
     proxy_scgi_module (shared)
     proxy_uwsgi_module (shared)
     proxy_fdpass_module (shared)
     proxy_wstunnel_module (shared)
     proxy_ajp_module (shared)
     proxy_balancer_module (shared)
     proxy_express_module (shared)
     slotmem_shm_module (shared)
     ssl_module (shared)
     unixd_module (shared)
     status_module (shared)
     autoindex_module (shared)
     negotiation_module (shared)
     dir_module (shared)
     alias_module (shared)
     rewrite_module (shared)
     php7_module (shared)
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @rr44
    I am sorry about the issue you are experiencing and I am happy to assist you with this.
    Can you please share your website URL?
    Also Can you please make sure that you enabled Expires header and cache-control header in Performance>Browser Cache>Media&Other files.
    Thanks!

    Thread Starter BeoR4

    (@rr44)

    Hi there, thank you for your mail. They are all enabled. The site is not public yet though. I’ll have to hold on a bit before sharing as a result. When I am allowed, can I share it directly?

    Thread Starter BeoR4

    (@rr44)

    The URL only, I mean, for any conversation to then continue here.

    Not one on one!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @rr44

    Yes, you can drop us a note via the plugin in Performance>Support or via our website https://www.w3-edge.com/contact/ and we can continue correspondence there.
    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Browser caching problem (images only)’ is closed to new replies.