Browser cache not compatible with page cache URL exclusions
-
Hi!
I have an issue (last WordPress and last W3TC version) where URLs excluded from page cache are still getting browser cache headers: “Cache-Control: max-age=86400”. So for any visitor the first page load will work fine but the second one will use a cached version from the browser instead of submitting the request to the server.
I’ve been digging into this issue and the page cache exclusion is working correctly and nothing is saved inside wp-content/cache/page_enhanced. But the browser cache header is set because of the rule: “ExpiresByType text/html A86400” inside the browser cache section in the main .htaccess.
I think this rule is not necessary as the cached pages have a special .htaccess inside “wp-content/cache/page_enhanced/domain” with:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html M86400
</IfModule>So removing the first rule would ensure no html page is cached excepting the ones from the page cache.
I’m not sure my fix is the best possible one but for now we are removing that rule. Can you fix this in the next plugin version?
Thanks!
- The topic ‘Browser cache not compatible with page cache URL exclusions’ is closed to new replies.