Edge Content Delivery: How It Works

Edge content delivery serves cached content from servers near the visitor instead of your origin. How it works, how it differs from a CDN, and its limits.

What is edge content delivery?

Edge content delivery means serving web content, such as images, scripts, pages and some API responses, from servers at the edge of the network, close to the visitor, instead of from your origin server on every request. When the edge can answer from its cache, the request never reaches the origin, which cuts latency and takes load off your servers.

How it works

  1. A visitor requests a URL and DNS sends them to a nearby edge server.
  2. The edge looks for a fresh copy. On a hit it answers at once. On a miss it fetches the file from the origin, stores it and answers.
  3. Your Cache-Control headers decide how long a copy counts as fresh. After that, the edge revalidates or refetches it.

MDN calls a cache like this a managed shared cache: one stored response can be served to many users, and simultaneous identical requests can be collapsed into a single request to the origin.

Edge delivery, CDN and edge computing

  • CDN: the network of servers and the service that runs it. Edge content delivery is what that network does with your content.
  • Edge computing: running code and logic near users, not only serving stored files.
  • Edge content delivery: serving a response, usually a cached one, from the nearest edge location.

The security angle

Edge servers can absorb part of a traffic flood, because cached requests are answered before they reach your origin. That helps, but it is not a complete defence: uncached requests still reach the origin, and the origin should not be reachable directly. See how to stop DDoS attacks for the layers that sit around it. CISA advises enrolling in a DoS protection service as a preventive step.

The other risk is privacy. MDN warns that personalised content in a shared cache can leak to other users, and a cookie alone does not make a response private. Mark per-user responses Cache-Control: private.

Common mistakes

  • Caching personalised or logged-in responses at the edge.
  • Forgetting to purge or version URLs after a change, so visitors see stale files. See cache invalidation and performance testing.
  • Judging speed from one location, when edge behaviour differs by region. See edge locations and cloud load.
  • Load testing only the cached path and never the origin on a miss.

Testing and monitoring edge delivery

Read the response headers of a page or asset with the free online curl tool: it shows caching headers such as Cache-Control and, for GET and HEAD, runs from six AWS regions at once. Page speed monitoring runs scheduled Lighthouse audits from 25 cloud regions, so you can see whether visitors far from your origin get the fast path. For load, LoadFocus load testing can run from 25 regions, and a run that includes uncached URLs shows what the origin handles when the cache does not help. Related: API caching and time to first byte.

FAQ: edge content delivery

Is edge content delivery the same as a CDN?

Nearly. A CDN is the network and the service. Edge content delivery describes serving content from that network's edge locations.

How is it different from edge computing?

Edge computing runs code near users. Edge content delivery mostly serves stored copies of content. Many providers offer both.

Does it protect me from DDoS attacks?

It can absorb part of the traffic that hits cacheable content, but it is one layer, not a full defence. Keep your origin protected and use a DDoS protection service.

Why do some visitors still see old content?

Their nearest edge is still serving a copy that counts as fresh. Purge it or change the URL when the file changes.

How fast is your website?

Elevate its speed and SEO seamlessly with our Free Speed Test.

Free Website Speed Test

Analyze your website's load speed and improve its performance with our free page speed checker.