Integration methods
Edge Side Includes (ESI)
Edge Side Includes (or ESI for short) is a way to dynamically assemble content on a website. The content is injected by the server.
ESI uses the HTML tag <esi:include …> and is implemented by some content delivery networks (CDN) .
You can find more information on the Wikipedia page: Edge Side Includes .
If your website uses the Cloudflare CDN , you can support ESI using https://github.com/xtuc/esi-cf-workers .
From the Cloudflare dashboard or using wrangler create the following Worker:
ESI uses the HTML tag <esi:include …> and is implemented by some content delivery networks (CDN) .
You can find more information on the Wikipedia page: Edge Side Includes .
Using Cloudflare
If your website uses the Cloudflare CDN , you can support ESI using https://github.com/xtuc/esi-cf-workers .
Deploy a Cloudflare Worker
From the Cloudflare dashboard or using wrangler create the following Worker:
import { withESI } from "esi-cf-workers"
export default {
async fetch(request, env, ctx) {
const res = await fetch(request)
return withESI(res)
},
};