Optimal way to handle Vary on User-Agent

Pinakee BIswas pinakee at waltzz.com
Fri Oct 13 12:19:58 UTC 2017


Hi,

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:

 1. Desktop
 2. Mobile (doesn't matter whether android, iOS or windows)
 3. Tablet

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:

 1. Normalize header User-Agent to only the 3 types mentioned above OR
 2. Add a new normalized HTTP header for the above 3 types. Our backed
    then Vary on the new HTTP header.

Would appreciate if any solution could be provided for the above..

Thanks,

Pinakee

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20171013/439663d9/attachment-0001.html>


More information about the varnish-misc mailing list