All spotlights

Product spotlight · February 2024

Build responses with JavaScript at the edge

Edge functions let you deploy JavaScript that builds a response each time its path is requested, with a dashboard code editor and a revision history for each function.

New product Edge functions For developers

What it includes

The February 2024 changelog has the full details.

  • JavaScript at the edge

    You can now deploy JavaScript edge functions. Each time a visitor requests the path of a function, the function runs and builds the response.

  • Create through the API

    You create a new function through the Quant API. After that, you work on it in the dashboard.

  • Dashboard code editor

    Open a function in the code editor in the dashboard to change its JavaScript. When it is ready, publish it from the same editor.

  • Revision history

    Functions keep a revision history in the same way as your other content.

Who it is for

  • Edge developers

    Write JavaScript that runs at the edge and builds a new response each time a visitor requests the function's path.

  • Static site teams

    Add a response that your code builds on each request to a site where the other pages are static content.

  • Teams that track changes

    Each function keeps a revision history in the same way as your other content, so you can see past versions.

What it is

Edge functions run your JavaScript at the edge. Each time a visitor requests the path of a function, the function runs and builds the response.

Static content stays the same until you publish a new version. An edge function builds its response on each request, so the response can be different each time. You can use one for a part of a site that must change with the request, and keep your other pages as static content.

Functions keep a revision history in the same way as your other content.

How it works

At launch, a function goes from code to a live path in these steps:

  1. You create the function through the Quant API.
  2. You open the function in the code editor in the dashboard and change its JavaScript.
  3. You publish the function from the code editor.
  4. When a visitor requests the path of the function, the function runs and builds the response.

The Edge functions page in the Quant documentation explains how to write a function.

Get started

  1. Read the docs

    Read Edge functions in the Quant documentation.

  2. Create a function

    Create the function through the Quant API.

  3. Edit the code

    Open the function in the dashboard code editor and change its JavaScript.

  4. Publish it

    Publish the function from the code editor so that its path returns its response.

  5. Check its revisions

    Look at the revision history of the function, as you do for your other content.

Related: Explore Edge functions · Documentation · February 2024 changelog

Ready to try it on Quant?

Use edge functions on your own project, or read the docs first.