ESI and Caching

Paul A. Procacci pprocacci at datapipe.com
Sat Oct 13 08:05:46 CEST 2012


On Sat, Oct 13, 2012 at 11:20:24AM +0530, linuxsupport wrote:
>    I think I did not make it very clear, let me explain
>    I have a file named abc.html as below
>    <html>
>    <head>
>    <title>Test</title?
>    <body>
>    <p>Test Page</p>
>    <p><esi:include src="/cgi-bin/abc.php"/></p>
>    </body>
>    </html>
>    This abc.php sends cookie, what I want is to cache all the contents of
>    abc.html and when doing esi processing (abc.php) include the Set-Cookie
>    header sent by abc.php with the response.
>    right now, abc.html is being cached and esi processing for abc.php is
>    also working but Set-Cookie header sent by abc.php is not being sent to
>    client.
>    possible?

See chapter six of the ESI spec: http://www.w3.org/TR/esi-lang

When an ESI template is processed, a separate request will need to be made for each include encountered. Implementations may use the original request's headers (e.g., Cookie, User-Agent, etc.) when doing so. Additionally, response headers from fragments (e.g., Set-Cookie, Server, Cache-Control, Last-Modified) may be ignored, and should not influence the assembled page.

Given the above, and given your explanation of your app disgarding cookies, then I'm going to go out on a limb and say i`not possible`.

~Paul

________________________________

This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/legal/email_disclaimer/ for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you.



More information about the varnish-misc mailing list