Serving cached pages after user logs in
-
Hi
I have a subscription website, where users can see restricted content after sign in and subscribe. If user is not logged in, the content is served partialy, with an error message.
Problem is, if the user is reading some page without login, then see this error and then login on “my account” page, when he comes back to the page he was reading before, the content served is cached with the message error, as he was not logged in (but he is).
If this user force his browser to flush cache using CTRL + F5, the refreshed page is correctly served.
So… I think maybe I’m having some issue with browser cache.
How can I force browser cache to clear after user logs in or how can I force W3TC or my browser to serve an uncached page if user is logged in?
My browser cache configs:
– Set Last-Modified header
– Set W3 Total Cache header
– Enable HTTP (gzip) compression
– Prevent caching of objects after settings change
– Don’t set cookies for static files
– Do not process 404 errors for static objects with WordPressIn page cache we are using: “Don’t cache pages for logged in users”.
I’m also using Cloudflare.
- The topic ‘Serving cached pages after user logs in’ is closed to new replies.