Questions tagged [esi]

Edge Side Includes or ESI is a small markup language for edge level dynamic web content assembly. The purpose of ESI is to tackle the problem of web infrastructure scaling by inserting ESI include tags directly into cached HTML documents. A ESI processors analyses the document to support different caching mechanisms and times different parts of the document, allowing for increased personalisation of cached pages.

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. This creates a problem for caching systems. To overcome this problem a group of companies (Akamai, Art Technology Group, BEA Systems, Circadence Corporation, Digital Island, Inc., Interwoven, Inc., Open Market, whose ESI-related technology is now owned by FatWire Software, Oracle Corporation 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 (W3C) for approval in August 2001. The W3C has acknowledged receipt, but has not accepted the proposal.

ESI is implemented by some content delivery networks, such as Akamai, and by some caching proxy servers such as Varnish, Squid and Mongrel ESI, although many do not implement the complete specification. Akamai also adds additional features to the version they support.

How ESI is implemented

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 this:

<esi:include src="http://example.com/1.html" alt="http://bak.example.com/2.html" onerror="continue"/>

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 or HTTP headers 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 can be used if an origin server is unavailable.
112 questions
0
votes
1 answer

Symfony2 esi cache user info

I need to cache my home page, this far no prob, using reverse proxy is good enough But I also need to include the header part with standalone (ESI) , so that I can check if user is connected and show his info "hello Vincent". The problem is that if…
Vincent Wasteels
  • 1,568
  • 2
  • 14
  • 21
0
votes
1 answer

Limit of Edge Side Includes within one page?

Currently we have a service creating XML pages based on various get parameters. As the number of parameters has increased, and number of different combinations has also increasing meaning the hit rate in our varnish cache has fell. We've increased…
Menelaos
  • 23,508
  • 18
  • 90
  • 155
0
votes
1 answer

Varnish ESI with Wordpress 3.5 Widget

I am trying to use Varnish ESI statements to avoid the cache on a single Wordpress Widget. I've found a good guide explaining the process for using ESI for the entire sidebar here:…
Paul Thomson
  • 105
  • 2
  • 11
0
votes
1 answer

Using ESI for user menu makes sense?

It is makes sense to you ESI for user menu? My main page in cached with s-maxage: $response = $this->render('MySiteBundle:Welcome:index.html.twig'); $response->setSharedMaxAge(600); return $response; Where i include by ESI user menu: {%…
John Smith
  • 209
  • 2
  • 8
0
votes
1 answer

Why do I get a 503 Service Unavailable on an ESI Fragment using Varnish?

I have set up locally Varnish and have implemented an ESI fragment on a specific area of the page; but as soon as I turn on ESI on the default.vcl, varnish stops caching and even more, that specific section of the page where the fragment is added,…
Sam3k
  • 960
  • 1
  • 11
  • 22
0
votes
1 answer

Varnish ESI include only works when parent page is fetched from backend

I'm running Varnish 3.0.2, Apache2, Pressflow. I am trying to get ESI up and working for the first time, and it does work, but only the first time the parent page is requested. After that it just pulls the parent page and the replaced content from…
-1
votes
1 answer

How to disable/setup transfer-encoding in varnish?

Varnish responds with Transfer-Encoding: chunked for ESIed pages, but this does not work for some proxies(squid). I want to disable transfer-encoding for ESI.
shenyan
  • 408
  • 4
  • 9
1 2 3 4 5 6 7
8