We have a web application run on nginx
how can we tell Cloudflare to not cache a page using nginx ?
any help would be appreciated
Hi,
Cloudflare by default does not cache HTML pages. It only caches static files (images, CSS, JS etc.)
Cloudflare only caches HTML if you instruct it to do so, via Page Rules, Cache Rules (beta), Workers etc. Are you using one of these features? If so, please post details so a member of this community may be able t help you.
i want to tell cloudfalre to not cache any 404 response comes from nginx is there a way ? bcs i upload some files and when i access them before they uploaded they return 404 page and cloudfalre cache this response for long time
From the page I linked to above:
Cloudflare does not cache the resource when:
- The
Cache-Control
header is set toprivate
,no-store
,no-cache
, ormax-age=0
.
Just make sure your origin is returning 404s with one of these Cache-Control settings. If for some reason you cannot change the Cache-Control header, you should try a Cache Rule (beta) where you can set specific instructions depending on the response HTTP status code.
thank u sir i really appreciate it
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.