<div dir="ltr">The user-agent is an abomination and needs to die.<div><br></div><div>Now, with that being said, I would rewrite the UA header, just to make sure the backend doesn't use the original information.</div><div><br></div><div>You can have a look at <a href="https://github.com/varnishcache/varnish-devicedetect">https://github.com/varnishcache/varnish-devicedetect</a> for a vcl solution. Other solutions exist, obviously.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>-- <br></div>Guillaume Quintard<br></div></div></div>
<br><div class="gmail_quote">On Fri, Oct 13, 2017 at 2:19 PM, Pinakee BIswas <span dir="ltr"><<a href="mailto:pinakee@waltzz.com" target="_blank">pinakee@waltzz.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<p>Hi,</p>
<p>We are using Varnish 4.1.8 to cache and speed up our web
delivery. Our page content varies based on following 3 device
types:</p>
<ol>
<li>Desktop</li>
<li>Mobile (doesn't matter whether android, iOS or windows)</li>
<li>Tablet</li>
</ol>
<p>As universally known, varying on User-Agent is quite bad for
caching as there would be thousands of UA. Hence, would like to
know a solution based on following if possible in Varnish:</p>
<ol>
<li>Normalize header User-Agent to only the 3 types mentioned
above OR</li>
<li>Add a new normalized HTTP header for the above 3 types. Our
backed then Vary on the new HTTP header.</li>
</ol>
<p>Would appreciate if any solution could be provided for the
above..</p>
<p>Thanks,</p>
<p>Pinakee<br>
</p>
</div>
<br>______________________________<wbr>_________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" rel="noreferrer" target="_blank">https://www.varnish-cache.org/<wbr>lists/mailman/listinfo/<wbr>varnish-misc</a><br></blockquote></div><br></div>