0

I currently run a website behind a Varnish server, It contains a few browser conditions for Internet Explorer 6. Unfortunately Varnish is caching the first version it serves without taking into account the conditions. Is there any way I can configure it to have a different cache for IE6 users ?

Thanks

mnml
  • 327
  • 1
  • 7
  • 21

2 Answers2

2

I don't think the logic should be implemented in VCL.

If the origin servers are serving up different content on the same URL based on the user agent, then it should be issuing a suitable header - e.g. Vary: Accept-Encoding, User-Agent

If you're saying that the origin is providing this and Varnish is ignoring it then its a bug in varnish. If the origin is not serving up such a header then its a bug in the code running on the origin server.

symcbean
  • 19,931
  • 1
  • 29
  • 49
  • Despite my answer below, I am inclined to agree here. This is the default behaviour we get with varnish (as you describe)- it 'just works'. What mnml seems to be describing looks like something that's not the norm. – chrism2671 Mar 30 '11 at 23:33
1

I believe so; probably the best thing to do would be to forward the request headers to the web server, which will generate a separate version for each one.

chrism2671
  • 2,549
  • 9
  • 34
  • 45