Antwort: [Mod_gzip] Serving precompressed static files *without*
mod_gzip?
mod_gzip@lists.over.net
mod_gzip@lists.over.net
Thu, 8 May 2003 15:53:23 +0200
Hi Nigel,
> I'm trying to set up Apache 1.3 so it can serve
> precompressed static files (e.g., index.html.gz)
> that will transparently decompress and display
> at the client, when the client requests index.html.
how do you maintain your precompressed versions?
How do you check whether the uncompressed version's
content has changed since the compressed version
was created?
> I'm doing this to avoid the latency of gzipping the
> content on the fly (albeit relatively small) for
> otherwise static content.
The intention is clear. mod_gzip may well be over-
sized if your content is all static.
> I know this can be done with mod_gzip but I'm sure
> there must be a really simple way to do this with
> vanilla Apache 1.3 by using multiviews?
Serving - yes. Updating - no.
> I've tried something like this in httpd.conf:
> Options ExecCGI MultiViews
> AddEncoding gzip .gz
> ... but when the file arrives at the client (IE 5.0+)
> the 'Save As' dialog pops up.
Uh. Yes, there are some problems with M$IE and these
encoding.
May we have a look at the HTTP headers your Apache
is actually sending?
(http://www.schroepl.net/cgi-bin/http_trace.pl)
Could you provide an URL so that we can test the
scenario with different browsers?
> Any ideas?
As you seem to be willing to explore, I guess that
reading
http://www.schroepl.net/projekte/gzip_cnc/
might at least give you some ideas about the topic.
This one might not be fast enough for your purpose
(which isn't actually its goal, it was rather meant
to prove the point for implementing the cache con-
cept into mod_gzip later, and for doing it all on
a server where I have no authorization to install
Apache modules).
But it shows you the principle of how to solve the
maintenance issue as well.
There may be lots of other mechanics to implement
that - in your case it might well be a (cron-
triggered?) "make" mechanism running over your
whole document tree or whatever.
Regards, Michael