Antwort: [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
Fri, 6 Dec 2002 21:11:48 +0200
Hi Jordan,
> While looking through my http access logs today I was alarmed to
> find a lot of repeat requests for the same .gif files from the
> same hosts in a very short period of time.
so you actually do compress *.gif files - what for?
You would not gain a lot by this, maybe even gain nothing.
You may quite likely waste a lot of CPU time only.
And if not, reconsider the format of these GIFs and make
them smaller, by using the minimum color depth they require.
(mod_gzip doesn't make fine-tuning completely obsolete.)
So you rather just exclude these completely from the com-
pression, either by some "exclude" rule, or by some "<Files>"
section, then turning mod_gzip off for these.
In both cases mod_gzip would not sent a "Vary:" header, as
it actually didn't do any negotiation - and is aware of it
(at least the 1.3.26.1 version).
> Changing mod_gzip_send_vary to No solved the problem, but of
> course that creates issues with Squid...
Sure. You should at least serve the correctly working clients
what they deserve, and that is a HTTP response labelled as
a negoriation result. That is what "Vary:" is meant for.
> If you have a site with static pages and a lot of repeat visitors
> using IE, the total bandwidth consumed by "mod_gzip + no caching"
> could end up being higher than "no mod_gzip + caching".
Not if you only compress the things that are worth being
compress, which doesn't include GIF files IMHO.
> Can anything be done about it?
Just don't try to compress GIFs.
And maybe add "Cache-control: private" or "public" for these
images, to "encourage" M$IE caching them - don't know if it
helps, but it certainly won't hurt at all (public) rsp. a lot
(private, which will then leave caching proxies out of the game).
>(Maybe mod_gzip should avoid sending Vary headers unless it detects
> signs of a proxy server?)
You can't detect the proxy servers - they aren't required to
send a "Via:" header. They only do it if they decided being
nice to you.
Regards, Michael