Available in all subroutines.

Flags a request for parsing edge side includes. Parsing occurs after the vcl_deliver subroutine has finished, so this statement has no effect if executed in vcl_log.

In order for the ESI parser to detect <esi:... tags in the response stream, the response cannot be compressed. Compressed responses will obfuscate the ESI tags and they will be delivered unprocessed to the client.

Try it out

esi is used in the following code examples. Examples apply VCL to real-world use cases and can be deployed as they are, or adapted for your own service. See the full list of code examples for more inspiration.

Click RUN on a sample below to provision a Fastly service, execute the code on Fastly, and see how the function behaves.

Relative date insertion using ESI

Generate relative time datelines like "3 minutes ago" at the Edge instead of in JavaScript or at origin. Better caching, faster rendering, fewer reflows.

Edge-side includes (ESI)

Use Fastly's support for ESI to combine multiple origin-hosted objects into a single response at the edge.