Optimal way to handle Vary on User-Agent
Guillaume Quintard
guillaume at varnish-software.com
Fri Oct 13 12:31:19 UTC 2017
The user-agent is an abomination and needs to die.
Now, with that being said, I would rewrite the UA header, just to make sure
the backend doesn't use the original information.
You can have a look at https://github.com/varnishcache/varnish-devicedetect
for a vcl solution. Other solutions exist, obviously.
--
Guillaume Quintard
On Fri, Oct 13, 2017 at 2:19 PM, Pinakee BIswas <pinakee at waltzz.com> wrote:
> 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
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20171013/87df2144/attachment.html>
More information about the varnish-misc
mailing list