Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 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.

share|improve this answer
    
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

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.