HOME

TheInfoList



OR:

Edge Side Includes (ESI) is a small
markup language Markup language refers to a text-encoding system consisting of a set of symbols inserted in a text document to control its structure, formatting, or the relationship between its parts. Markup is often used to control the display of the document ...
for
edge Edge or EDGE may refer to: Technology Computing * Edge computing, a network load-balancing system * Edge device, an entry point to a computer network * Adobe Edge, a graphical development application * Microsoft Edge, a web browser developed ...
level
dynamic web content A server-side dynamic web page is a web page whose construction is controlled by an application server processing server-side scripts. In server-side scripting, parameters determine how the assembly of every new web page proceeds, and includin ...
assembly. The purpose of ESI is to tackle the problem of web infrastructure scaling. It is an application of edge computing. It is fairly common for websites to have generated content. It could be because of changing content like catalogs or forums, or because of
personalization Personalization (broadly known as customization) consists of tailoring a service or a product to accommodate specific individuals, sometimes tied to groups or segments of individuals. A wide variety of organizations use personalization to improv ...
. This creates a problem for caching systems. To overcome this problem a group of companies ( Akamai, Art Technology Group,
BEA Systems BEA Systems, Inc. was a company that specialized in enterprise infrastructure software products which was wholly acquired by Oracle Corporation on April 29, 2008. History BEA began as a software company, founded in 1995 and headquartered in ...
, Circadence Corporation, Digital Island, Inc., Interwoven, Inc., Open Market, whose ESI-related technology is now owned by FatWire Software,
Oracle Corporation Oracle Corporation is an American multinational computer technology corporation headquartered in Austin, Texas. In 2020, Oracle was the third-largest software company in the world by revenue and market capitalization. The company sells da ...
and
Vignette Corporation Vignette Corporation was a company that offered a suite of content management, web portal, collaboration, document management, and records management software. Targeted at the enterprise market, Vignette offered products under the name StoryServ ...
) developed the ESI specification and submitted it to the W3C for approval. The proposal editor was Mark Nottingham. ESI Language Specification 1.0 was submitted to the
World Wide Web Consortium The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 and led by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working ...
(W3C) for approval in August 2001. The W3C has acknowledged receipt, but has not accepted the proposal. ESI is implemented by some
content delivery network A content delivery network, or content distribution network (CDN), is a geographically distributed network of proxy servers and their data centers. The goal is to provide high availability and performance by distributing the service spatially rel ...
s, such as Akamai, and by some caching
proxy server In computer networking, a proxy server is a server application that acts as an intermediary between a client requesting a resource and the server providing that resource. Instead of connecting directly to a server that can fulfill a reques ...
s such as
Varnish Varnish is a clear transparent hard protective coating or film. It is not a stain. It usually has a yellowish shade from the manufacturing process and materials used, but it may also be pigmented as desired, and is sold commercially in variou ...
,
Squid True squid are molluscs with an elongated soft body, large eyes, eight arms, and two tentacles in the superorder Decapodiformes, though many other molluscs within the broader Neocoleoidea are also called squid despite not strictly fittin ...
and
Mongrel A mongrel, mutt or mixed-breed dog is a dog that does not belong to one officially recognized breed and including those that are the result of intentional breeding. Although the term ''mixed-breed dog'' is sometimes preferred, many mongre ...
ESI, although many do not implement the complete specification. Akamai also adds additional features to the version they support.


Syntax

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 Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. T ...
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: 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.


Features

There are four main features in ESI: * ''inclusion'' of page fragments, as illustrated above; * ''variables'' which can be set from
cookies A cookie is a baked or cooked snack or dessert that is typically small, flat and sweet. It usually contains flour, sugar, egg, and some type of oil, fat, or butter. It may include other ingredients such as raisins, oats, chocolate chi ...
or
HTTP header The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, w ...
s and then used in other ESI statements or written into markup; * ''conditions'' so that different markup can be used based on variables, for example if a cookie is set or not; * ''error handling'', so that a
failover Failover is switching to a redundant or standby computer server, system, hardware component or network upon the failure or abnormal termination of the previously active application, server, system, hardware component, or network in a computer net ...
can be used if an origin server is unavailable.


Alternatives

The main alternatives to ESI are * to do assembly on the origin server using
Server Side Includes Server Side Includes (SSI) is a simple interpreted server-side scripting language used almost exclusively for the World Wide Web. It is most useful for including the contents of one or more files into a web page on a web server (see below), using ...
and many types of server-side scripting. * to use client-side scripting and techniques collectively known as
Ajax Ajax may refer to: Greek mythology and tragedy * Ajax the Great, a Greek mythological hero, son of King Telamon and Periboea * Ajax the Lesser, a Greek mythological hero, son of Oileus, the king of Locris * ''Ajax'' (play), by the ancient Gree ...
(see:
Dynamic web page A server-side dynamic web page is a web page whose construction is controlled by an application server processing server-side scripts. In server-side scripting, parameters determine how the assembly of every new web page proceeds, and includi ...
) in the browser * to establish a protocol between origin and edge such that recurring content will be included on the edge automatically, as with Cloudflare's Railgun protocol * to do assembly in the browser using
web components Web Components are a set of features that provide a standard component model for the Web allowing for encapsulation and interoperability of individual HTML elements. Primary technologies used to create them include: * Custom Elements: APIs to ...
.


References

{{Reflist


External links


Akamai's ESI developer resources

W3C Note "ESI Language Specification 1.0"
Scripting languages Proxy servers