set cookies with ESI includes possible?

Marko Kruijer marko at oktober.nl
Mon Feb 28 13:24:38 CET 2011


I'm currently using varnish for a fairly large webshop. My ESI includes 
generate the dynamic content on various pages.

The problem I'm having here is that I need a few cookies to be set for 
every user, this functionality is done by the ESI includes.

However they are not being set if the page is cached. I know that 
Varnish generates the complete page (by fetching the cache and the ESI 
stuff and putting it all together) and thus set cookie headers from the 
ESI are not sent through to the client. Is it possible to still do this 
somehow?

I can also resort to setting cookies by javascript, generated by ESI and 
whatnot, but I'd rather try the 'non-javascript' approach first.

Regards,
Marko





More information about the varnish-misc mailing list