Cloudflare cache issues
Why your changes aren't showing up after a deploy, and how to clear Cloudflare's cache to force fresh content.
Cloudflare Pages serves your site from a global network of edge servers. After a deploy, most visitors see the new version immediately — but occasionally a cached version persists. This page explains why that happens and how to fix it.
The two layers of cache
Cloudflare's edge cache — Cloudflare caches your HTML, CSS, and assets on its edge servers worldwide. For static sites, this cache is normally invalidated automatically after each deploy. If it isn't, you can purge it manually.
Your browser's cache — Your browser stores copies of files locally. Even after Cloudflare serves fresh content, your browser may show the old cached version. Always check in a private/incognito window before concluding Cloudflare is the issue.
Check whether it's a browser issue first
- Open a private or incognito browser window.
- Visit your site.
- If the new content appears, the issue is your browser cache — press
Ctrl+Shift+R(orCmd+Shift+Ron Mac) in your normal window to do a hard refresh.
Purge Cloudflare's cache manually
If the issue persists in incognito:
- Log in to the Cloudflare dashboard.
- Select your domain (not the Pages project — the domain under Websites).
- Go to Caching → Configuration → Purge Cache.
- Click Purge Everything.
This removes all cached files. The next request to each URL fetches a fresh copy from your Pages deployment.
Note: Purge Everything affects the domain, not just Pages. If you're running other services on the same domain, they'll also be cache-purged.
Trigger a fresh Pages deployment
If your deploy completed successfully but the content still looks wrong, try triggering a new deploy:
- In the Cloudflare dashboard, go to Workers & Pages.
- Open your Pages project.
- Open Deployments and click Retry deploy on the most recent successful build.
A fresh build and deploy clears Pages' internal artifact cache as well.
The build succeeded but my article is missing
This is usually not a cache issue — it's a build issue. Check:
- Is the article's
draftfield set totrue? Drafts don't appear in indexes. - Is the article's
datein the future? Future-dated articles are suppressed until that date passes. - Did the Markdown file commit to
main? If it's on a branch, it won't deploy.
See Common issues for more build-related debugging.
CSS or JS changes not appearing
If stylesheets or scripts look stale after a deploy:
- Hard-refresh in your browser (
Ctrl+Shift+R). - Check the
?v=cache-busting query string on the CSS<link>tag inbase.njk. If the version value isn't being updated on deploy, increment it manually and push. - Purge Cloudflare's cache as described above.
What to do next
- Deploy failures — if the build itself is failing.
- Common issues — content not appearing, wrong output, unexpected behavior.
Browse Support for community channels and paid support options, or book a call if you'd like me to set it up for you.