What is a CDN?
Distance costs time on the internet. A content delivery network keeps copies of your files close to every visitor, which matters most for images, game assets and first page loads.

Key takeaways
- A CDN serves cached copies of static files (HTML, scripts, images, audio) from a server near each visitor.
- It shortens the round trip that dominates load time for distant visitors and absorbs traffic spikes.
- A CDN does not make database queries or slow backend code faster; those still go to the origin.
Picture a network of servers spread across dozens of cities: that is a CDN (content delivery network), and its job is to keep copies of your website's files close to visitors, so someone in Sydney downloads your images from a nearby server instead of one in Virginia. Most fast sites you visit are served this way, and so are app downloads, video streams and browser games.
An everyday example: regional warehouses
An online store with one warehouse ships every order from that building, so far-away customers wait a week. Big retailers keep the popular items stocked in regional warehouses, and most orders arrive the next day. The original warehouse is still the source of truth; the regional ones hold copies. A CDN does the same with files. Your hosting is the origin; the CDN's servers, called edge locations or points of presence, hold cached copies.
Why distance matters so much
Data travels through fiber at roughly two-thirds the speed of light, so a round trip across an ocean takes on the order of 150 to 250 milliseconds before any processing. Loading a page is not one trip but many: the HTML, then scripts, styles, fonts and images it references, plus the connection setup for HTTPS. Shave that distance to a nearby edge, often under 30 milliseconds away, and a page that took three seconds for an overseas visitor can feel close to instant. The benefit is largest for:
- Games: sprite sheets, audio files and 3D models can add up to tens of megabytes, all fetched before play starts.
- Image-heavy pages: galleries, listings, menus and portfolios.
- Launch days: when a post goes viral, the CDN absorbs thousands of requests for the same files instead of your origin.
The first visitor in a region may cause a cache miss: the edge does not have the file yet, fetches it from the origin and keeps a copy. Everyone after that in the same region gets the fast copy until it expires. For a published site that changes only when you republish, that means nearly every visit is a hit. Dynamic, per-user responses, such as a signed-in user's dashboard data, are not cached this way and travel to the origin every time.
Why it matters when building with Startbase
Startbase publishes web apps, sites and games on Cloudflare Pages hosting, which serves them from Cloudflare's global network, so you get CDN delivery on every plan without setting anything up. Publishing builds a snapshot of your project; while a republish builds, the current version stays live until the new one is ready (publishing docs). What the CDN cannot do is shrink oversized files. A 6 MB background image is still 6 MB from a nearby server, and on a phone over mobile data that is the real bottleneck.
Make the game load faster on phones. Convert large PNG images to WebP, keep each background under about 300 KB, compress music to a smaller format, load level 1's assets first and fetch later levels in the background, and show a progress bar while the first level loads.
For more on load size, see game performance on phones and how apps store files and images.
Common confusions
- A CDN is not your backend. Signed-in data, database queries and payments travel to the origin servers. Slow queries need indexes, not a CDN.
- Stale files are a caching question. If visitors see an old version after an update, the cache rules decide when copies refresh. Build tools usually add a fingerprint to file names so new versions get new URLs.
- A CDN is not a host. Some services are only a CDN in front of your hosting; others, like Pages-style hosts, bundle both.
Frequently asked questions
Do I need a CDN for a small app?
If your host already serves through one, you have it for free. Even a small audience spread across countries notices the difference on first load.
Does a CDN help SEO?
Indirectly. Faster pages improve Core Web Vitals, which feed into search ranking and, more importantly, keep visitors from leaving before the page appears.

