httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Montague <>
Subject Re: [users@httpd] About file compression and transmission
Date Tue, 07 Jun 2011 04:30:10 GMT
 On June 6, 2011 23:06 , =?GB2312?B?y++/oQ==?= <> wrote:
> The file is stored in text format prior to transmission is, every time
> there is file access,
> apache the file in memory after compression by gzip module to send to
> the client.
> That there is duplication of the same file read, compression,
> transmission.
> Is there any function can use a similar gzip file compression program
> stored in advance,
> For example, jquery.js.gz, when there is access to jquery.js
> jquery.js.gz sent directly to the client,
> The client to decompress the file. Rather than to repeat the
> compression jquery.js apache files.

Use mod_deflate, see The files will not
be compressed in advance, but this is OK: cost of compression is
minimal, and modern CPUs can easily do it without problems.

I do not recommend this, but if you still want to compress files in
advance, see
Note that even though the files are compressed in advance, there is
duplication of the same file read and transmission -- the only thing you
save is the compression step. But this requires you to have two copies
of every file: a compressed copy, and an uncompressed copy (for browsers
that do not support compressed content encoding). Also, be careful to
re-create the compressed version any time you update the non-compressed
version, or you will serve different versions of the files to different
web browsers and this problem may be hard to diagnose.

  Mark Montague

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message