ESI element tags are inserted into HTML or other text based content during creation. Instead of being displayed to viewers, these ESI tags are directives that instruct an ESI processor to take some action. The XML based ESI tags indicate to the edge-side processing agent the action that needs to be taken to complete the page's assembly. One simple example of an ESI element is the include tag which is used to include content external to the page. An ESI include tag placed in-line within an HTML document would look like:6
In this case the ESI processor would retrieve the src URL, or failing that the alt URL, or if that failed do nothing. The ESI system is usually a caching proxy server so it may have a local copy of these files which it can insert without going back to the server. Alternatively the whole page with the ESI tags may be cached, and only the ESI requests may be made to the origin server. This allows different caching times for different parts of the page, or different degrees of personalisation.
There are four main features in ESI:7
The main alternatives to ESI are
Mark Tsimelzon; Bill Weihl; Joseph Chung; Dan Frantz; John Brasso; Chris Newton; Mark Hale; Larry Jacobs; Conleth O'Connell (2001-08-04). "ESI Language Specification 1.0". W3C. Retrieved 2008-11-10. http://www.w3.org/TR/esi-lang ↩
"Mongrel ESI". https://code.google.com/p/mongrel-esi/ ↩
"Varnish ESI features". Retrieved 2011-04-07. http://www.varnish-cache.org/trac/wiki/ESIfeatures ↩
"EdgeSuite 5.0 ESI Extensions to the ESI 1.0 Specification" (PDF). Retrieved 2011-04-07. http://www.akamai.com/dl/technical_publications/akamai_esi_extensions.pdf ↩
"Railgun™". June 2023. https://www.cloudflare.com/railgun/ ↩