Prevent cache in CloudFlare

I am at the center of the project, and yesterday I started working with CloudFlare.

The problem is that when I make the changes, I do not see it in the browser, so I assume that the problem here is in setting the CloudFlare cache.

I read the CloudFlare cache link, so I put a meta tag in my html:

<meta http-equiv="Cache-control" content="private"> 

But the problem is not resolved.

Should I put other meta tags or prevent server side cache server? (I am using PHP)

+6
source share
6 answers

cloudflare has a Development mode parameter that:

  • Changes to cached content (such as images, CSS, or JavaScript) will be visible immediately.
  • CloudFlare accelerated cache will be disabled.
  • Development mode will automatically switch after 3 hours.
  • If the changes to your site are not immediate, click shift-reload.

You can also turn off Development mode at any time for 3 hours.

Hope this helps people who are looking for the same answer to this question, or if you still have this problem.

+6
source

I have a couple of exaggerations.

You can try

 <meta http-equiv="Cache-control" content="max-age=0"> 

If you are not successful with this, have you considered using page rules? Check out the page section at https://support.cloudflare.com/entries/22576178-Is-there-a-tutorial-for-PageRules-

Good luck

0
source

I know this is an old post, but Cloudflare has development mode if you edit your website in dev mode (in cloudflare settings) ...

otherwise send the header "Expires: -1" ... with "must-revalidate"

(and you tried Ctrl + R)

0
source

I just needed to do this, and it looks like CloudFlare has updated its page rules. Now you can create a page rule for a specific URL (and even use wildcards), and then select Cache Level> Bypass to configure.

0
source

Even though dev mode works, I also had to disable the orange cloud in CF DNS for my domain. Only after that I received an uncached file.

0
source

This is a very old question. To disable this, we do not need to enable development mode because the cloud caches CSS and JS. If you want to disable only JS or CSS, just put the following attribute in the link or script tag.

 <script data-cfasync="false" src="/javascript.js"></script> 
0
source

All Articles