Reputation: 1514
I'm getting started with CloudFlare and I’m using it to build a new project.
I’m facing an issue when I make changes: I cannot see my changes in the browser, so I assume the problem here is the cache setting of CloudFlare.
I have read this link, about the CloudFlare cache, so I put the following meta-tag in my html:
<meta http-equiv="Cache-control" content="private">
But the problem still remain.
Should I put other meta-tags, or prevent -somehow- caching from the server-side? (I'm using PHP)
Upvotes: 12
Views: 35168
Reputation: 12197
When I read you question it appears that you are (actually) wanting to specify caching rules in your code instead of directly on CloudFlare, I do this all the time.
This can be enabled globally or via a (targeted) page rule.
Upvotes: 3
Reputation: 9
I know this is an old post, but Cloudflare have a development mode, if you're editing your website turn dev mode on (in cloudflare settings)...
otherwise send a "Expires: -1" header... with "must-revalidate"
(and have you tried Ctrl + R)
Upvotes: 0
Reputation: 1146
This is very old question. To disable this we don't have to turn on development mode because cloudfare caches the CSS and JS. If you want to disable only the particular JS or CSS simply put following attribute to the link or script tag.
<script data-cfasync="false" src="/javascript.js"></script>
Upvotes: 4
Reputation: 379
I just had to do this and it seems CloudFlare has updated their page rules. You can now create a page rule for a specific URL (and even use wildcards) then choose Cache Level > Bypass for the setting.
Upvotes: 3
Reputation: 146
cloudflare has a Development mode
option that:
You will also be able to turn off the Development mode
at any time during the 3 hours.
Hope this helps with people looking for the same answer to this question or if you still have this issue.
Upvotes: 13
Reputation: 25485
I have a couple of suggustions.
You could try
<meta http-equiv="Cache-control" content="max-age=0">
If you don't have any success with this, have you considered using page rules? Check out the page rules section on https://support.cloudflare.com/entries/22576178-Is-there-a-tutorial-for-PageRules-
Good luck!
Upvotes: 0