---
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-07-10T21:28:40.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/eb275ddb9290b947ba4c53ac30538c77b44edae9-720x405_1y2MXK.webp)

News & Announcements June 25, 2026

[

### Netlify Functions, designed for Agent Experience

](/blog/netlify-functions-designed-for-agent-experience)

-   ![Profile picture of Eduardo Bouças](/_astro/52958f21e8450baf6d8e60302341a984e220c0cd-512x512_13VDlu.webp)
    
    Eduardo Bouças
    

![](/_astro/d20f9f717bbdd511f73ee138be4114ff13f480f9-2400x1350_1fe4aq.webp)

News & Announcements June 24, 2026

[

### How we measure Netlify’s Agent Experience

](/blog/how-we-measure-netlify-agent-experience)

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

## Recent posts

News & Announcements June 25, 2026

[

### Netlify Functions, designed for Agent Experience

](/blog/netlify-functions-designed-for-agent-experience)

-   ![Profile picture of Eduardo Bouças](/_astro/52958f21e8450baf6d8e60302341a984e220c0cd-512x512_13VDlu.webp)
    
    Eduardo Bouças
    

News & Announcements June 24, 2026

[

### How we measure Netlify’s Agent Experience

](/blog/how-we-measure-netlify-agent-experience)

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

Guides & Tutorials May 15, 2026

[

### How to build a real-time AI chatbot in minutes with Netlify Agent Runners (no backend)

](/blog/how-to-build-a-real-time-ai-chatbot-in-minutes-with-netlify-agent-runners-no-backend)

-   ![Profile picture of Nahrin Jalal](/_astro/f0e7c8f227a03fe58340c99ef5439d5a896c0733-272x272_Z23kDpD.webp)
    
    Nahrin Jalal
    

![](/_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/)