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

#1

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

0 Likes

#2

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:

2 Likes

#3

Workers aren’t for free…

0 Likes

#4

Seriously?

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.

2 Likes

#5

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…

0 Likes