Re: [XHR] Open issue: allow setting User-Agent?

(I noticed people talking about this on IRC and commented, and zcorpan
pointed me to this thread.)

On Tue, Oct 16, 2012 at 7:08 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> The point is that a browser can act as if every single server response
> included "Vary: User-Agent".  And perhaps should.  Intermediary caches
> _certainly_ should.

In terms of correctness, yes, but that will make them useless as
caches.  If a moderate number of users with an assortment of browsers
are using the same caching proxy, it's entirely possible that no two
of them have the same exact User-Agent string.  Varying on User-Agent
in a heterogeneous browser environment is going to drop your cache hit
rate to the point where the cache hurts performance more than it
helps.

Proxy caching is always going to break some pages, because not all
pages serve correct caching headers.  This can cause them to break
just due to browser cache too, but more caching is going to break them
more.  So proxy caching is always a correctness-performance tradeoff.
In practice, the loss in correctness is not worth the added
performance for most users, which is why most Internet users are not
(I think?) behind any sort of client-side proxy caching layer.  (I'm
not counting reverse proxies here.)  Where the performance gain is
worth it, such as behind an expensive or high-latency link, users will
just have to be trained to try pressing Ctrl-F5 if pages break.

Received on Wednesday, 17 October 2012 08:58:19 UTC