PWA caching results in logged-out cached pages for logged in users
-
Initially thought this was an issue with Cloudflare caching or WP-Supercahe, but it turned out to be my PWA, as using chrome’s “bypass for network” option in devtools fixes the issue.
Basically what happens is since a visitor first loads a page while logged out, the PWA will cache that logged out state (and oddly, even pages never visited sometimes give a logged-out state).
This even happens to my admin user even though I’ve been logged in on this PC for weeks.
The PWA should probably delete and recreate it’s cache when a user’s logged in, so it’s caching the logged in state from that point at least. For a workaround, is there a way I can clear the PWA cache upon login? It’s frustrating because I’m trying to add an ad-free option for my logged in Patreon users, but the PWA will cache pages with ads.
- The topic ‘PWA caching results in logged-out cached pages for logged in users’ is closed to new replies.