Bypassing cache for cookie not working in Chrome and clones
-
Hi!
I’m using the Cookie and Content Security Policy plugin, and I have set Super Page Cache to bypass cache for pages that have the
cookies_and_content_security_policy
cookie set. In Firefox and Safari when I open any page of the site with cookies and cache cleared, the page cache status isDYNAMIC
, and after accepting all cookies the cookie above is set, the page gets reloaded asDYNAMIC
again and pulls all the initially blocked scripts.In Chrome however, a weird thing happens. Whichever page of the site is the first one I open in a clean browser session, it gets loaded as
DYNAMIC
at first, but when the cookie above is set with the preferences accepting all cookies, the page gets reloaded with cache statusHIT
and keeps blocking the supposedly allowed scripts. Going to any other page on the site works correctly, the cookie is respected by the browser, the cache status isDYNAMIC
, and all scripts load just fine.Going back in history to the initial page doesn’t change anything. Going to that page from the site menu (forward in browser history) doesn’t change anything. Clearing the browser cache and hard refreshing the page doesn’t change anything. A simple refresh after at least 20 minutes (didn’t time it, just refreshed, and it worked) makes the page work as intended.
My cache lifetime settings are set to the default values that came with Super Page Cache –
31536000
for CloudFlare and60
for browser. If I understand correctly and those are seconds, then it shouldn’t be related to my problem. Tried changing the browser value to20
, but that didn’t change anything either.I’m at a loss here. Am I doing something wrong? Is it Chrome? Or the other way around – Firefox and Safari are doing something that makes it work when it shouldn’t? Please help.
The page I need help with: [log in to see the link]
- The topic ‘Bypassing cache for cookie not working in Chrome and clones’ is closed to new replies.