Re: Antwort: Re: Antwort: Re: Antwort: Re: Antwort: [Mod_gzip] Vary: header and mod_gzip

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 28 Aug 2002 17:33:16 +0200

Michael.Schroepl@telekurs.de wrote:

> > Not a problem. You just blacklist the browser.
> >
> > There is a problem if you find that a browser misbehaves in certaion
> > conditions by advertising capabilities it cannot handle but you do not
> > want to blacklist the browser version.
>
> which is exactly the case with Netscape 4.

Is it? Do you seriously want to send gzipped content to Netscape 4 for this
URI if you know it does not work?

> But I don't want to blacklist Netscape 4, as 25% of my
> visitors ar running this thingy and the compression
> factors for large tables in HTML are in the range of
> 95-97%. This is essential.
> Therefore I have to use the full range of mod_gzip's
> configuration skills to exclude certain MIME types
> (URI extensions don't reliably provide what I need)
> rather than simply exclude the broken browser as a
> whole.

Which is entirely fine. A static rule for this URI (indirectly via response
mime type) blacklisting the browser.

A blacklist does not need to be unconditional, byt may well contain entries
like
  * Do not gzip application/x-javascript to Netscape-4.x
  * Do not gzip text/css to Netscape-4.x

Both these rules are static in nature and implies that responses to URIs of
these response types should use "Vary: Accept-Encoding, User-Agent" on all
replies, or at a minimum any gzipeed replies if you run mod_gzip to mainly
conserve your bandwidth and not neccesarily the end-users bandwidth.

The fact that you have such rules in your HTTP server does not imply that you
need (or should) include User-agent in the vary header for other content
types.

To simplify the rule engine in how to decide upon the kind of Vary header to
use you may simply include any headers touched while evaluating if this reply
should be gzipped. You do not need to keep track of all possible rules that
might apply, only the rules that did apply (as either true or false) for this
reply.

Regards
Henrik
Received on Wed Aug 28 2002 - 09:33:25 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:16:15 MST