WP Admin Bar Being Cached and Served to Users



It has come to my attention that if Iogged into my WP site and the admin bar is showing in the top nav that CF has sometimes cached that page and served it to users. The user doesn’t have admin access but they still see the Admin bar.

Some research has shown that I can remove the Admin bar altogether to prevent this, BUT I use the Admin bar a lot and want to keep wasy access to edit pages. Does anyone know how I can keep the Admin bar visible (when logged in) but not allow CF to cache that page?

Thank you


This is a caching issue and possibly if you’ve created a Cache Everything page rule.
Under the CF Caching tab, you’ll want to set Browser Cache Expiration to “Respect Existing Headers”
Under Page Rules tab, create another page rule (which should be the first rule) something like
Cache Level = Bypass
Disable Performance

Then after that, flush your website’s caches in both WordPress and Cloudflare.


Great, thank you so much!!!


You’re welcome! To ensure everything keeps working as it should, test your website using your web browsers InPrivate mode.

closed #5

This topic was automatically closed after 14 days. New replies are no longer allowed.