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
0 answers

The security context contains no authentication token ESI and Symfony2

I'm using ESI (Edge Side Includes) to speed up my page but every time that I want to check if the user is loged in or not I get this error: AuthenticationCredentialsNotFoundException: The security context contains no authentication token. One…
0
votes
2 answers

Symfony 2 ESI Cache

I have an action which is called in all my page (for logged people only), this action retrieves recent tweets from my twitter account. API access is limited so I would like the result of this action to be in cache for 10 minutes public function…
Hexune
  • 21
  • 4
0
votes
1 answer

can esi:include src be used as an esi variable in html page

Example: Issue with esi:assign and esi:include in a html page rendered through akamai cdn http://www.trial.com/abc/def/ghjiy (Akamai rendering src) has content "abc" In an html page
0
votes
1 answer

How to do donut caching with c# mvc and Varnish?

I added to varnish config sub vcl_fetch { set beresp.do_esi = true; } } In my mvc application I've a childaction
@* this should not be cached, I change the returned value in my DB *@ 1 @Html.Action("GetHour", "Index", new { id =…
ramires.cabral
  • 910
  • 4
  • 13
  • 28
0
votes
1 answer

Varnish not processing ESI request when fetching the page containing esi tag from cache?

I am using ESI for not caching a fragment of page. I have written the following configuration in vcl file for not caching my fragment: sub vcl_backend_response{ set beresp.do_esi = true; if (bereq.url ~ "/fragment") { set…
0
votes
0 answers

How do I get nested esi tags working?

I am using ESI with Symfony and Varnish. What I am trying to do is.. Render an esi block, inside another esi block. Unfortunately the nested esi tags are not replaced. Any ideas why?
Gabriel Filipiak
  • 966
  • 12
  • 24
0
votes
1 answer

Can ESI content be banned / invalidated in varnish?

I have a content page that uses an esi:include tag to include a module, so let's say /content.html contains Both urls send cache-conttrol headers in their response. For /content.html it's Cache-Control:…
Marty Mulligan
  • 1,134
  • 7
  • 9
0
votes
0 answers

Control Varnish cache time from php script

It is possible in Varnish to use ESI tags to give multiple sections on your page different cache times. Using varnish 4 For example : index.php ...
Paolo_Mulder
  • 1,233
  • 1
  • 16
  • 28
0
votes
1 answer

Symfony ESI Cache / Surrogate Listener Issue

I've got a product I've deployed to a live Ubuntu 14.04 server, which works fine in app_dev. However, when I run it in app, it brings up a 503 error, with the below in the app log file: I've got the exact same code in a Vagrant setup, same OS…
Steve Childs
  • 1,832
  • 2
  • 20
  • 26
0
votes
1 answer

Magento Varnish Cached blocks visible for logged in users

My clients Magento-site is hosted on SiteGround with SuperCacher activated. SuperCacher is a SiteGround optimized version of Varnish. It uses a version of Turpentine for Varnish caching. I've got at Search block that is only visible to logged in…
user2002046
  • 63
  • 1
  • 8
0
votes
0 answers

Magento - Varnish / ESI:Include / Custom Pricing Based on Cookie

I am implementing esi:includes in a site using Varnish. The main reason for doing this is to be able to serve users north / south pricing based on their postal code that gets saved to a cookie. However, the performance seems to be quite an issue…
Alicia
  • 1
0
votes
1 answer

with network-path reference

I just discovered that performing an using a network-path reference is not possible; it returns an error in the inclusion. Is possible to include an absolute URL omitting the protocol/scheme? I need to include pages via…
Kamafeather
  • 8,663
  • 14
  • 69
  • 99
0
votes
1 answer

ESI (Edge Side Include) and hinclude content on search engine?

First of all I'm very sorry if this question does belong, if so please let me know where I should post it if possible. I have recently discovered ESI and Hinclude as ways to boost my side performance, but I have searched up and down and could not…
mr1031011
  • 3,574
  • 5
  • 42
  • 59
0
votes
1 answer

Varnish prevent esi access from external source

I have Varnish up and running and every thing works just fine. But I am using esi and well it works fine but I want to prevent that external resources can access the esi directory. Now I have it…
MKroeders
  • 7,562
  • 4
  • 24
  • 39
0
votes
1 answer

Symfony2 ESI caching + Last Modified

I'm working on a symfony2 website where I need several pages cached, but some parts have to stay uncached (like a user menu etc). I've checked the documentation and ESI seems to be built exactly for this. I started implementing caching in my…
Jones03
  • 1,207
  • 2
  • 12
  • 30