“Offline Browsing” Toggle and caching
-
So I may be confused in how I’m interpreting things, but I’m running into an issue with 302 redirects being cached by the service worker. I have the site in “network-first” mode as outlined in the plugin description. That is, the “offline browsing” checkbox is checked. Based on a previous response, I can see that this should show “Cache-Control: no-cache” in the request headers – which it does. However I’m still seeing in Chrome Web Tools, my requests are resolving as:
200 (from service worker).My understanding is in network-first mode, I should only be seeing cached results when offline? The specific issue I’m having is: I have a page that should temporarily redirect based on a cookie (I’ve tried setting the redirect both as 302 and 307, same result). The problem is, after the cookie is cleared – the service worked seems to be continuing to serve that redirect, even in network-first mode. Am I misunderstanding something about the way it’s supposed to work? If I disable the PWA plugin it all works perfectly. I don’t have any other caching installed.
Thanks in advance for your help!
- The topic ‘“Offline Browsing” Toggle and caching’ is closed to new replies.