Search code examples
wordpresscachingrefreshmembership

Logged-in Users need to Refresh page to see content


Hi I'm having an issue with a site where visitors need to be members to access certain pages, but once logged in they go to these pages and still see the 'not logged in' page and need to refresh to view the actual content.

This obviously leads to a lot of bounces and I'd like to fix so that they see the content right away.

The root issue comes from some cache settings or something from the host - unfortunately we can't change host (and it's not a regular hosting company with a website but a design company reseller) for the time being. This issue does not occur in our offline environment of the same site.

I've already had to add a ?randomnumber to the stylesheet so it loads new versions properly. I was wondering if something like this would work - but dynamically as pages are being added all the time by different admins.

Or any other solutions also appreciated!

Thanks


Solution

  • Like you said, tweaking the caching settings would be the most ideal. But since that's not an option, I'd suggest adding a random, meaningless query string to the URL of the member pages so that it's seen as a 'new page' and (likely) won't cache.

    So instead of /member-page

    Direct them to /member-page?cache-buster=randomlyGeneratedStringHere