Unit 9 · Ship it and keep it alive
Old content on your site: stale vs broken
If the site answers 200 with old content, it is stale, not broken: a cache is serving a stored copy. Read the response headers to find which cache, then clear that one. A redeploy does not clear every cache.
The mix-up
What people often think
“If the site shows old content, it is broken.”
What the tutor says
A site that answers 200 with old content is stale, not broken. The fix is a refresh, not an emergency.
How it works
Your browser is one cache, but the CDN in front of the site serves everyone, and it is often the one holding the old page. Some caches, such as stored data from a content system, survive a deploy entirely.
Caching is not the enemy. It makes the site fast and cheap. Keep it, and clear it on purpose when content changes.
Close cousins of this mix-up
The tutor watches for these in the same lesson.
“Redeploying clears every cache.”
Some caches survive a deploy, like stored data from a CMS. Read the headers, then clear the specific cache.
“Caching causes trouble, so turn it off.”
Caching makes the site fast and cheap. Keep it and clear it on purpose when content changes.
“The cache is in my browser.”
Your browser is one cache. The CDN in front of the site serves everyone, and that is the one holding the old page.
Practise it with a tutor watching
Caches
Tell stale from broken by reading cache headers, then clear the right cache instead of redeploying blindly.
Free with an account. The first two units need no account.