What is CDN caching?

Corbin Brown
2 min read
CDN Caching Explained in 5 Minutes (for beginners)Premieres soonPart of the Vibe Coding Fundamentals video series on YouTube.
Your website lives on a computer somewhere — say, Virginia. A visitor in Tokyo asking that computer for your homepage is sending a request across the planet and waiting for the answer to travel back. A CDN (content delivery network) fixes the geography: it keeps copies of your site's files on computers in hundreds of cities, and every visitor gets served from the one nearest them. Tokyo gets Tokyo's copy. The distance problem disappears.
Caching is the copy machine
The mechanism is caching — keeping a saved copy of something instead of fetching the original every time. The first Tokyo visitor's request goes all the way to Virginia, but the CDN keeps what came back; every Tokyo visitor after that gets the local copy instantly. Each copy carries an expiration time, and when it lapses the CDN refetches. Images, fonts, and code files cache beautifully because they rarely change. Pages showing per-user data mostly don't, and shouldn't.
Why builders actually need to know this
- You almost certainly have one already. Vercel, Netlify, and Cloudflare all put a CDN in front of your site automatically, free. This is not a thing to add — it's a thing to understand.
- It explains the ghost bug: you deploy a fix and the site still looks old. Nothing's broken — a cache is serving its saved copy until it expires. Hard-refresh (Cmd+Shift+R) rules out your browser's cache; “purge cache” in the host's dashboard rules out the CDN's.
- Speed is an SEO input. Google ranks fast pages higher, and a CDN is the cheapest speed you'll ever buy — relevant if your site isn't showing up in search.
FAQ
Do I need to pay for a CDN?
Almost never as a starting builder — the free tiers of Cloudflare and the built-in CDNs of modern hosts cover you far past your first thousands of users. Paid tiers matter for video-heavy sites and serious traffic.
Can caching serve users stale data?
Yes, if the wrong things get cached — a user seeing someone else's account page is the nightmare version. Frameworks and hosts default to caching only safe, shared content, which is one more reason to let the platform handle it rather than prompting an agent to hand-tune cache rules.