How to turn off no-cache headers

I moved a WordPress site to a new host – it is working but slow. Does not seem be caching html even though I setup both litespeed cache and a CloudFlare cache-everything page rule. Looking at the headers in Chrome developer tools, I see these:
cache-control: no-store, no-cache, must-revalidate
pragma: no-cache
cache-control: max-age=0

This turns off caching, right? I certainly did not mean to do that but I may very well have done something dunderheaded that caused it. Any advice how I can correct this?

Those are probably set by wordpress since there’s dynamic content on the page; if these pages end up cached then chances are there could be consequences if a page for one user is served to another user, such as the admin bar showing up for other users.

If you really want to override the header to test compatibility, you can set “Edge Cache TTL” in your page rule to a time limit and CF will ignore the header.

1 Like

Hi Judge,

Thank you much for your speedy, knowledgeable reply. I tried your “Edge Cache TTL” page rule tip and … it works! My site is speedy again. I still would like to stop those pesky no-cache headers from getting set in the first place - and I’m confident that eventually I will puzzle it out. In the meantime, this is a great solution. Thanks again.

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