Help for owners
I updated my website but visitors still see the old version
Short answer
A CDN keeps copies of files at its edge until they expire or are purged, so a change at your server may not show for a while. Purging a single URL is the safe fix on Cloudflare, an invalidation on CloudFront. Versioned file names avoid the problem, since visitors cannot hold an old copy of a new name.
Does this sound like your situation?
- I see the new page but customers still see the old one.
- A new logo or price is live on the server but not on the site.
- The new design works for me in a private window and not on my phone.
- Some visitors see the update and others do not.
- Only images or style files stay old.
Why does this happen?
The CDN keeps a copy until it expires
Cloudflare caches files by extension such as CSS, JS, images and PDFs by default. If the origin sends no cache headers, a 200 response is kept for a default time at the edge, and the page lists origin headers that stop caching. Your change reaches the edge only once that copy expires or is purged.
Confirmed by developers.cloudflare.com
A purge is needed after a change
Cloudflare says to purge after you change content so the edge serves the update, and it offers purge by single URL, tag, host, prefix or everything. After a purge, request the file and check that the CF-Cache-Status header is no longer HIT.
Confirmed by developers.cloudflare.com
On CloudFront, an invalidation or a new file name
AWS describes two ways: invalidate the file so the next request goes back to the origin, or serve a differently named file. AWS recommends versioned file names for frequent updates because a visitor may keep an old copy locally or behind a company proxy until it expires.
Confirmed by docs.aws.amazon.com
Long cache times set in the code or server
A long max-age on the page or its files tells the CDN, and often the browser, to keep the copy for a long time. This is set by whoever built the site, and it is often the real reason.
The wrong layer was cleared
The site may sit behind a CDN, a hosting cache and a plugin cache at once. Clearing only one leaves the others serving the old file.
What can I do about it today?
- Check in a private window and another deviceIf a private window on your phone shows the old version, the copy is not only in your own browser.
- Find out which CDN you useAsk your developer or look at your domain's DNS provider. Cloudflare and CloudFront are common, and each has its own purge page.
- Purge only the changed filesOn Cloudflare use a single-file purge for the page or image that changed. Avoid purging everything on a busy site unless you have to.
- Also clear any caching plugin or host cacheIf the site uses WordPress or a host that has its own cache button, clear it too.
- Do not turn the CDN offChanging nameservers or DNS to bypass it can bring the site down or expose the server. Leave DNS alone.
When should I bring someone in?
- Customers see old prices, offers or legal text and that matters now.
- Every release needs a manual purge.
- You are not sure which of several caches serves the page.
How do I handle it?
- Trace the requestI check the response headers to see which layer answered and how old that copy is.
- Purge narrowlyThe changed URLs are purged or invalidated, not the whole cache.
- Make updates safe by designStatic files get versioned names so a new release can never be shown as an old file.
- Set sensible cache rulesPages that change often get short cache times, and files that never change get long ones.
- Automate the purgeThe release process purges what changed, so nobody has to remember.
The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.
What do owners ask about this?
Will purging the CDN fix it for everyone?
It clears the CDN copy. A visitor's own browser may still hold an old file until it expires, which is why versioned file names are the more reliable method.
Does Cloudflare cache my web pages?
By default Cloudflare does not cache HTML or JSON, only files with listed extensions, unless a rule or origin header changes that.
Does invalidation cost money?
AWS says versioned file names avoid the cost of invalidations. Check its pricing page for what applies to your account.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.