Edge Side Includes

Called Edge Side Includes or ESI, is to assemble a markup language for web pages dynamic components and deliver them as a finished page. ESI is an approach to scaling problems, get a web server by increasing traffic to prevent or defuse.

Modern websites often consist of many components with different life. This provides caching systems with completely new tasks. The element on the page with the shortest life expectancy determines how long they can be stored in the cache. If now included on a page with mostly static content a dynamic element such as a message box, it is no longer useful to cache the page as a whole, since the messages at the time of caching for the lifetime of the cached element is static. To live without caching would mean that all contents of the page with each call must be assembled again, which affects the computational cost and delivery time of the page.

To solve this problem, a group of companies (including Akamai, BEA Systems, Oracle Corporation) jointly developed the ESI specification and version 1.0 of the specification submitted to the W3C in August 2001 for approval. Although the specification was rejected by the W3C, ESI is used by some content distribution networks (eg, Akamai ) and proxy servers (eg Varnish, Squid and Mongrel ) support. While most proxy servers often implement only a part of the specification, Akamai has added more features to the support of their version.

How will ESI implemented?

ESI element tags are inserted into HTML and other text- based content during creation. The elements defined by this tag are not represented directly, but interpreted by the ESI processor as commands for certain actions. The XML -based ESI tags indicate to the ESI- agent which actions have to be performed so that the page can be fully charged. A simple example of an ESI element is an include tag, which integrates external content into the page. An ESI include tag might look like this:

In this example, the ESI- processor would try the source URL (src) display, if this is not reached, the alternative URL ( old) is used. If this also fails, the element is removed silently.

In conjunction with a proxy cache servers thus ESI offers different caching scenarios. It is conceivable, for example, that the accessed files will be stored locally and thus the delivery of this content is accelerated. Alternatively, the page will be cached embeds the ESI tags and only the content that is downloaded via ESI, to be requested for each call. This allows different caching times for one and the same site or different levels of personalization.

Features

The ESI specification describes, among other things, four main features:

  • Inclusion
  • Variables
  • Conditions
  • Error Handling

In addition to the above-described insert page fragments via include variables can be used, consisting of certain HTTP headers ( Accept-Language, Host, Referer, User-Agent ), a übermitteltem cookie or a query string ( URL parameter ) originate in ESI statements are used. These variables are read-only and can be used in logical expressions to certain conditions to load content dependent. The error handling error handling is done by the onerror attribute that allows to react to the fact that the original source is not available, and instead of HTTP status codes like 404 uses an alternative URL to load the element, or from the output removed ( see example above ).

Alternatives

The main alternative to ESI is already making the joining of the pages on the Web server through, for example, server-side includes, and many types of server side scripting, or by using the client side scripting the browser and techniques such as Ajax.

253989
de