Fix a cache that serves old content
We'll confirm the origin has new content, clear the browser cache, fix Cache-Control headers, or purge the CDN so users see the latest version.
What you'll need
- Access to the server or CDN (to fix headers or purge)
- Browser DevTools to inspect Cache-Control and clear cache
Step-by-step diagnostic
Quick triage — pick your path
Get started
Choose the option that matches what you see. You can jump straight to that section.
- Follow this guide Work through the full procedure from confirming the symptom to fixing cache.
- Confirm origin has new content You need to verify the server serves the update when cache is bypassed.
- Clear browser cache You want to test with a fresh browser cache.
- Fix Cache-Control The server sends long max-age for content that changes often.
- Purge CDN You use a CDN and need to invalidate cached content.
- When to contact support You have tried the fixes and users still see old content.
Show full guide
Steps
Goal: Confirm the origin has new content, clear the browser cache, fix Cache-Control headers, or purge the CDN so users see the latest version.
- Verify the origin server has the new content when cache is bypassed (curl or incognito with cache disabled).
- Good: Origin has new content—cache is the issue. Proceed to Confirm origin.
- Bad: Origin still serves old—fix deployment first.
Confirm origin has new content
Goal: Rule out deployment before fixing cache.
- Use curl with Cache-Control: no-cache or open the URL in incognito with DevTools > Network > Disable cache.
- Good: Origin has new content. Proceed to Clear browser cache or Purge CDN based on where the cache is.
Clear browser cache
Goal: Test with a fresh browser cache and fix headers for future updates.
- Hard refresh: Ctrl+Shift+R (Windows/Linux) or Cmd+Shift+R (Mac). Or DevTools > Application > Storage > Clear site data.
- For ongoing fixes, set Cache-Control: no-cache or short max-age for content that changes often. Use cache-busting (versioned URLs) for static assets.
- Good: Users see new content. Bad: CDN may also be caching—purge it.
Fix Cache-Control
Goal: Set headers so the browser and CDN do not cache content too long.
- HTML and dynamic content: no-cache or max-age=0. Static assets that change: use a versioned URL (app.js?v=123) and set long max-age; the new URL bypasses cache.
- Restart the server and retest. You should see the correct headers in DevTools > Network > Response Headers.
- Good: Headers are correct. Bad: CDN may have its own cache—purge it.
Purge CDN
Goal: Invalidate the CDN cache for updated URLs.
- Log into the CDN dashboard (Cloudflare, Fastly, etc.). Use Purge or Invalidate. Purge by URL or path prefix. Purge only what changed.
- Wait a few minutes and retest. You should see the new content.
- Good: CDN serves fresh content. Bad: Purge may take time—retest. If it persists, check for intermediate caches.
When to get help
- You have cleared browser cache, fixed Cache-Control, and purged the CDN and users still see old content. Capture response headers, CDN purge log, and affected users. Check for reverse proxy or WAF cache. Contact hosting or CDN support.
Verification
- The origin serves new content when cache is bypassed.
- The browser and CDN serve new content after clear or purge.
- Cache-Control headers match the update frequency of each resource type.
Escalation ladder
Work from the device outward. Stop when the problem is fixed.
- Confirm origin Verify the origin server has the new content when cache is bypassed.
- Clear browser cache Hard refresh or clear site data to test with fresh cache.
- Fix Cache-Control Set no-cache or short max-age for content that changes often.
- Purge CDN Purge the CDN cache for updated URLs.
- Cache-busting Use versioned URLs for static assets.
- Contact support Escalate with headers, purge log, and affected users.
What to capture if you need help
Before calling support or posting for help, have these ready. It speeds everything up.
- Cache-Control header from the response
- CDN provider and purge status
- Whether the origin serves new content when cache is bypassed
- Steps already tried
Does the origin server have the new content when cache is bypassed?
Use curl or incognito with cache disabled. If the origin serves old content, the problem is deployment, not cache.
You can change your answer later.
Is the stale content from the browser or a CDN?
Browser cache: clear site data or hard refresh. CDN: purge the cache. Both: do both.
You can change your answer later.
Clear browser cache and fix Cache-Control
Hard refresh or clear site data. Then fix Cache-Control so future updates are not cached too long.
Purge CDN and fix Cache-Control
Purge the CDN for updated URLs. Fix Cache-Control so the CDN does not cache too long.
Fix deployment first
If the origin serves old content, the cache is not the problem. The deployment or build may not have updated the origin.
Reviewed by Blackbox Atlas
Frequently asked questions
- Why would a cache serve old content?
- The browser, CDN, or proxy stores a copy of the response. If Cache-Control allows long storage (max-age) or the CDN has not been purged, the cache returns the old copy until it expires or is purged.
- What is Cache-Control and when should I use no-cache?
- Cache-Control tells the browser and CDN how long to store the response. no-cache means revalidate with the server before using. no-store means do not store. max-age=3600 means store for 1 hour. Use no-cache or short max-age for content that changes often.
- How do I purge a CDN cache?
- Log into the CDN dashboard (Cloudflare, Fastly, etc.) and use the purge or invalidate feature. Purge by URL, path prefix, or everything. Purge only what changed to avoid overloading the origin.
Rate this guide
Was this helpful?
Thanks for your feedback.