[squid-users] clientProcessHit

Amos Jeffries squid3 at treenet.co.nz
Wed Mar 9 23:53:52 UTC 2016


On 10/03/2016 7:40 a.m., joe wrote:
> look at that   firefox and chrome  same vary
> z
> http://platform.instagram.com/en_US/embeds.js
> 


Ah, you said you understood Vary. But this mail indicates that you do
not quite understand it well enough.

I prune away the extra headers to clarify:

Firefox:

> GET /en_US/embeds.js HTTP/1.1
> Accept-Encoding: gzip, deflate

> 
> HTTP/1.1 200 OK
> Vary: Accept-Encoding

> ----------------------------------------------------------

Chrome:

> GET /en_US/embeds.js HTTP/1.1
> Accept-Encoding: gzip, deflate, sdch

... notice how Accept-Encoding changed.

> 
> HTTP/1.1 200 OK
> Vary: Accept-Encoding


The Vary header tells Squid that these objects are to be stored with the
*content* of the requests Accept-Encoding header added to their URL on
the cache index.

The Accept-Encoding details are effectively being added to the URL
query-string without actually being added to the public URL users see.

Since the Accept-Encoding headers are different on the Chrome requests
these objects are as different in cache.

Firefox shares Accept-Encoding value with IE, and with some command-line
tools. So they have no problems caching for one and re-using the cached
object for another.
But Chome do the Google sdch thing, so it cant use those objects and has
to have a separate object cached just for Google products.

Amos



More information about the squid-users mailing list