Antwort: Re: [Mod_gzip] "mod_gzip_send_vary=Yes" disables caching on IE? (1.3.26.1a)

mod_gzip@lists.over.net mod_gzip@lists.over.net
Mon, 9 Dec 2002 14:50:29 +0200


Hi Kevin,


>> Disagree. When for example you provide the User-Agent
>> specific JavaScript, >or CSS, you would consider to
>> place "Vary: User-Agent" in your response even with no
>> compression at all.
> 1. The "Vary: User-Agent" signal on a RESPONSE is still meant
> for inline Proxy Server Caches only and NOT for the 'end point'
> User-Agent itself. The 'User-Agent' knows what it's own "User-Agent'
> string is and it's never going to change. ( at least not while the
> browser is currently running, anway ) "Vary: User-Agent" is only
> meant for an inline Server that has some chance of receiving
> DIFFERENT requests from DIFFERENT "User-Agents".
> "Vary: User-Agent" is meaningless to the end-point browser.

I think I can construct an example that might contradict
your very general statement. For this I assume the mecha-
nism Slava was talking about to be in effect, although I
would advise against using this kind of browser detection.

There is a browser named Opera which is able to camouflage
itself by making its "UserAgent:" header configurable (be-
cause there are so many "broken" web sites out there that
have the "UserAgent" of the M$IE hard coded and exclude
every other visitor).
But this is doing more than just sending a different HTTP
header. Opera will eventually _act_ as a M$IE if it says
so - it will be able to understand JavaScript code like
"document.all" when it names itself being an M$IE, while
it would not understand the very same code when naming
itself "Opera"!
Changing the UserAgent actually changes the code paths
being run inside Opera - and this can be done on the fly
during surfing, with no more than one key stroke and one
mouse click (because you are going to need this often).

So there might well be a situation when even the UserAgent
wants to know whether the content of its cache varies on
the "UserAgent" string, because it would need that knowled-
ge to override any expiration date settings in case its
UserAgent value has changed from the previous request -
which is a likely situation with Opera: You surf as "Opera"
wherever possible, but quickly change to "M$IE" when you
experience the page will not treat you correctly otherwise.
So you have to reload the page with the new settings, and
the browser is now required to detect that this means sen-
ding a new HTTP request, because the HTTP headers did con-
tain a "Vary: UserAgent" in the previous response.


Regards, Michael