Script examples

Edge Scripting stands at the forefront of web optimization and customization, enabling developers to programmatically manipulate HTTP requests and responses at the network edge—closest to the user.

The examples provided below illustrate how Edge Scripting can be used for a variety of common tasks, including URL redirection, content fetching, dynamic response generation, and more, empowering you to optimize your web applications effectively.

To learn more, take a look at examples below:

  1. Redirect to another domain
  2. Fetch url
  3. Modify HTTP headers
  4. Return HTML
  5. Return JSON

These examples showcase the flexibility and power of Edge Scripting for custom request handling, allowing you to implement a wide range of web performance optimizations and functionalities directly at the network edge.