<div>On Thu, Aug 26, 2010 at 9:21 AM, Alessandro Ronchi <span dir="ltr"><<a href="mailto:alessandro.ronchi@soasi.com">alessandro.ronchi@soasi.com</a>></span> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
In my project I have both gzip and plain version of CSS and JS files, based on user browser preferences. How can I make varnish cache both versions and give the user the correct version?<br></blockquote><div><br></div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><div>
Varnish will cache both versions if your back end server sends a "Vary: Content-Encoding" header. You probably want to normalize this header. See <a href="http://varnish-cache.org/docs/trunk/tutorial/increasing_your_hitrate.html#vary" target="_blank" style="color: rgb(0, 0, 204); ">http://varnish-cache.org/docs/trunk/tutorial/increasing_your_hitrate.html#vary</a> for details on how to do that.</div>
</span><div><br></div><div>-- </div></div><div>Per Buer,  Varnish Software<br>Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / skype: per.buer</div><br>