---
title: "Introducing Edge Handlers in Preview | Netlify"
description: "Realize the speed, agility and performance of a scalable, composable web architecture with Netlify. Explore the composable web platform now!"
source: "https://www.netlify.com/blog/2020/05/27/introducing-edge-handlers-in-preview/"
last_updated: "2026-08-05T06:35:57.000Z"
---
As adoption of the Jamstack model has become more widespread, so have the needs of a traditional CDN shifted. Today, content is expected to be fast, highly customizable, and up to date within a fraction of a second. Strictly static CDNs, which store static assets and serve them indistinguishably for every request, are insufficient to handle the more dynamic, personalized nature of modern content.

We believe that the CDN should not just be a store for static assets, it should also be an avenue to run your code alongside it. We’re therefore incredibly delighted to release Edge Handlers, a way to directly run code right from the CDN.

## A little background

We at Netlify have been acutely aware of the challenges a _strictly static_ CDN raises, and have been exploring ways in which we can offer our users programmability at the CDN level so content can be more dynamic. Redirects was one aspect of this exploration. With redirects, users can control how content is served right from the edge nodes. This makes serving content based on language, country or user permissions possible. Even so, edge based functionalities that Netlify offers (such as redirects) are finite. Try as we might, we will never fully cover the spectrum of possibilities when it comes to edge functionalities.

## How it works

With Edge Handlers, you get full control over how your content is served to the end user. Here’s an example of how you can take advantage of it to augment content so users get highly personalized content.

In this example, we are serving users a page with data showing the number of covid 19 cases in their area. To do this, we read the headers from the incoming request and re-write the content based on where the request is coming from, so if you’re in San Francisco, you’ll get covid data specific to San Francisco and so on. Here’s what that might look like:

```
import td from ./data.jsonimport { render } from './render.js'
export async function onRequest(event) {  const request = await event.getRequest()  const state = request.headers.get('X-NF-Subdivision-Code')  const data = state && td.find(el => el.state === state)
  if (data) {    const props = {      cityName: request.headers.get('X-NF-City-Name'),      stateName: request.headers.get('X-NF-Subdivision-Name'),      dcLocation: request.headers.get('X-NF-Availability-Zone'),      ...data    }    await event.respondWith(200, render(props), {})  }}
```

## Coming soon to Netlify Edge

Edge Handlers bring new possibilities to the CDN and pushes the boundaries of what is possible within a Jamstack model. We are incredibly excited for this release and look forward to seeing all the inventive things you create with this. We plan on rolling this feature out gradually, so if you’re keen on getting beta access or want to be notified when it ships, sign up [here.](https://www.netlify.com/products/#netlify-edge-functions)

### Share

-   [X (fka Twitter)](https://twitter.com/intent/tweet?text=Introducing Edge Handlers in Preview&url=https://www.netlify.com/blog/2020/05/27/introducing-edge-handlers-in-preview//)
-   [LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.netlify.com%2Fblog%2F2020%2F05%2F27%2Fintroducing-edge-handlers-in-preview%2F%2F)
-   [Facebook](https://www.facebook.com/sharer.php?u=https://www.netlify.com/blog/2020/05/27/introducing-edge-handlers-in-preview//)
-   [Bluesky](https://bsky.app/intent/compose?text=Introducing Edge Handlers in Preview+https://www.netlify.com/blog/2020/05/27/introducing-edge-handlers-in-preview//)

## Keep reading

![](/_astro/19ef665d69b3b077bd19c76d9dfcda7749cad7af-1600x900_Z5yehl.webp)

News & Announcements July 28, 2026

[

### New Netlify projects are now private by default

](/blog/new-netlify-projects-are-now-private-by-default)

-   ![Profile picture of Taylor Barnett-Torabi](/_astro/cf4624da8c1286738397b6fecb53bad504df140b-400x400_ZsvK0s.webp)
    
    Taylor Barnett-Torabi
    

![](/_astro/d0354fe52c160a3abdfdeff297a1baf090302a3d-1600x900_Z1eDdJG.webp)

News & Announcements July 14, 2026

[

### More headroom, a lower per-credit rate, and a bill you can predict: introducing new Pro plan tiers

](/blog/new-pro-plan-tiers)

-   ![Profile picture of Gehrig Kunz](/_astro/b4e9f58d914d1334ea70d53ea55a1f26b26f1445-512x512_17SwOI.webp)
    
    Gehrig Kunz
    

## Recent posts

Opinions & Insights July 28, 2026

[

### Open Weights and the 2nd World

](/blog/open-weights-and-the-2nd-world)

-   ![Profile picture of Mathias Biilmann](/_astro/f193d4707a6391d843d5aaa73338b5a5971ec5cc-960x960_1Yylqm.webp)
    
    Mathias Biilmann
    

Tools & Services July 28, 2026

[

### MCP goes stateless and extensible

](/blog/mcp-goes-stateless-and-extensible)

-   ![Profile picture of Sean Roberts](/_astro/bbf2243f8171dbddd80ab2103622106cef84d125-512x512_Z1d2LKE.webp)
    
    Sean Roberts
    

News & Announcements July 28, 2026

[

### New Netlify projects are now private by default

](/blog/new-netlify-projects-are-now-private-by-default)

-   ![Profile picture of Taylor Barnett-Torabi](/_astro/cf4624da8c1286738397b6fecb53bad504df140b-400x400_ZsvK0s.webp)
    
    Taylor Barnett-Torabi
    

![](/_astro/3f255b372fa958df35802666ee33b4609b2d71bd-1200x1586_1VtE2D.webp)

### How do the best dev and marketing teams work together?

[Access the report](https://www.netlify.com/reports/2024-leadership-trend-report/access/)