How it works · 34 of 36 Core
What is a CDN, and why does it make websites faster?
Keeping copies close to you
CDN: A content delivery network keeps copies of websites and videos in servers near you, so most requests never cross the sea.
Loading the animation…
Say it like this A CDN, or content delivery network, keeps copies of websites and videos on servers close to viewers, so most requests are answered nearby instead of crossing the world to the original server.
Under the hood — for builders
- Real case: how much of the web comes from a CDN
- The HTTP Archive measures millions of websites each year. In 2024 most of the files a page pulls in came through a CDN, and most big sites used one:
- How the shelf life is set
- The website labels every file with how long copies may be kept. These are standard HTTP headers:
- Hit and miss
- A hit means the edge already had a fresh copy; a miss means it fetched from the origin first. CDNs report a hit ratio; the higher it is, the fewer trips to the origin.
- Measure it
- In your browser's developer tools (F12) → Network, click a file and read its response headers: Cache-Control, Age, and often a header naming the CDN and whether it was a HIT or MISS.
- Watch out
- A long shelf life on a file that changes means visitors see the old version until it expires. Version file names (app.v2.js) or set a short s-maxage for pages that change.
- Sources
- HTTP Archive Web Almanac 2024, CDN chapter. RFC 9111. Read 28 Nov 2026.
What happens in the CDNs animation, step by step?
- A popular video lives on its company's server, often far away. Without help, every viewer's request crosses the ocean and back.
- A CDN, a content delivery network, puts servers close to viewers. Here, one in Mumbai, between you and the ocean.
- The first request still goes all the way. On the way back, the Mumbai server keeps a copy, with a shelf life the website sets.
- Your turn: switch the CDN off and on, and count the trips across the ocean.
- When the shelf life runs out, the edge asks the origin for a fresh copy. That's how a news site's front page can update every minute and still come from nearby.
- A CDN keeps copies close to you, so the trip is short. Next: what really happens when you type a web address and press Enter?
What everyday example explains CDNs?
A shop's local warehouse instead of shipping from the factory.
Why should a team care about CDNs?
A Mumbai viewer streams from a nearby copy, not a US server: faster, cheaper, and kinder to undersea cables.