HOME

TheInfoList



OR:

Edge Side Includes (ESI) is a small
markup language A markup language is a Encoding, text-encoding system which specifies the structure and formatting of a document and potentially the relationships among its parts. Markup can control the display of a document or enrich its content to facilitate au ...
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 by ...
level dynamic web content assembly. The purpose of ESI is to tackle the problem of web infrastructure scaling. It is an application of
edge computing Edge computing is a distributed computing model that brings computation and data storage closer to the sources of data. More broadly, it refers to any design that pushes computation physically closer to a user, so as to reduce the Latency (engineer ...
. 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 product to accommodate specific individuals. It is sometimes tied to groups or segments of individuals. Personalization involves collecting data on individuals, ...
. 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 corporation, multinational computer technology company headquartered in Austin, Texas. Co-founded in 1977 in Santa Clara, California, by Larry Ellison, who remains executive chairman, Oracle was ...
and Vignette Corporation) 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 by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working together in ...
(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 (CDN) or content distribution network is a geographically distributed network of proxy servers and their data centers. The goal is to provide high availability and performance ("speed") by distributing the service spat ...
s, such as Akamai, and by some caching proxy servers such as
Varnish Varnish is a clear Transparency (optics), transparent hard protective coating or film. It is not to be confused with wood stain. It usually has a yellowish shade due to the manufacturing process and materials used, but it may also be pigmente ...
,
Squid A squid (: squid) is a mollusc with an elongated soft body, large eyes, eight cephalopod limb, arms, and two tentacles in the orders Myopsida, Oegopsida, and Bathyteuthida (though many other molluscs within the broader Neocoleoidea are also ...
and
Mongrel A mongrel, mutt, or mixed-breed dog is a dog that does not belong to one officially recognized breed, including those that result from intentional breeding. Although the term ''mixed-breed dog'' is sometimes preferred, many mongrels have no kn ...
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 data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
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 sweet biscuit with high sugar and fat content. Cookie dough is softer than that used for other types of biscuit, and they are cooked longer at lower temperatures. The dough typically contains flour, sugar, egg, and some type of ...
or
HTTP header HTTP header fields are a list of strings sent and received by both the client program and server on every HTTP request and response. These headers are usually invisible to the end-user and are only processed or logged by the server and client ...
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 ...
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 and many types of
server-side scripting Server-side scripting is a technique used in web development which involves employing scripts on a web server which produces a response customized for each user's (client's) request to the website. Scripts can be written in any of a number of s ...
. * to use
client-side scripting A dynamic web page is a web page constructed at runtime (during software execution), as opposed to a ''static web page'', delivered as it is stored. A server-side dynamic web page is a web page whose construction is controlled by an application ...
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), ''Ajax'' (play), by the an ...
(see:
Dynamic web page A dynamic web page is a web page constructed at runtime (during software execution), as opposed to a ''static web page'', delivered as it is stored. A server-side dynamic web page is a web page whose construction is controlled by an application ...
) 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. Web Components are a popular approach when building microfrontends. Primary t ...
.


References

{{Reflist


External links


Akamai's ESI developer resources

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