HTML Caching problem. Cloudflare is cache'ing admin login details and comment forms to be visible for users

I’ve enabled agressive cache’ing and it helps to load my site faster by more than one second but it will remember admin login details for random users and comment forms (wpdiscuz).

Is it a problem with cookies? How to solve that?

I’m using wordpress

Aggressive caching is risky in Wordpress because of what you’ve discovered. It will cache based upon which ever visitor first hits the site before it’s cached.

Business plans can bypass cache for cookies, but for free plans, your best bet is this setup:


Workers aren’t for free…


You can control the cache behavior on your server and tell Cloudflare to respect existing headers. You can use Wordpress plugins for cache control. You can use page rules to exclude things from being cached.

Aggressive caching is not only a bad idea for Wordpress. It’s bad for almost every page that has a login area.


The easiest way would be to exclude only login pages (cache bypass wp_admin?), but comments (wpdiscuz) are on every page and random people can write as me (admin) because cache remember comment forms…

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