Automatic Platform Optimization (APO) - How to force refresh page after logging-in?

I’m not a techie guy, so excuse me. I’m trying out APO for Wordpress (self-hosted) for a month and loving the speed, but just one problem…

When a user logs in and then gets sent back to the previous page from before they were logged-in, it shows the cached version from before they were logged-in instead of a fresh page. Kind of a problem since it confuses my users when they’re trying to comment.

Is there any way to set it up so that it refreshes the page that they return to after they log in? I’ve also been using plugins that allow them to log-in through social media, so that might complicate things.

Hello! To clarify a bit, is this what you’re seeing:

  1. User logs in to wp-admin
  2. After being logged in, user hits back in browser and they unlogged version of page

I was not able to replicate on my test site using the above steps but I am not using a social login plugin.

It may be that the plugin is setting a cookie or using a query argument that is not getting cache excluded with the default settings. You may want to ask the plugin developer their opinion on what cache exclusions may be needed on Cloudflare.

Additionally, please ensure no page rules are configured on the domain that may conflict with APO.

Once a user logs-in on our site set the cookie that starts with wp- or wordpress. APO bypass caching if such cookies are present in the request.


This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.