innerjoin |
|
| innerjoin | apache-compression | |
Compressed data can be downloaded more quickly, the best maths are given in the Mozilla Perfomance HTTP Compression page. HTML compresses remarkably well, smaller quantities of data mean that pages arrive quicker and take less bandwidth.
Yes, but not as well as
gzip.
The ISP's modems compress the data as it is being sent down the line but gzip'd
data is significantly better compressed.
But this argument means, no, you won't see a two or three-fold improvement
in speed when downloading a large file if it the modem that is the bottleneck. The
HTTP Compression page
gives the results in a couple of practical cases.
If you have a bandwidth quota, MBytes a week or GByte a month, then serving compressed files means that you can handle more page requests.
This depends on many things.
.gif, .png or .jpg files
have their own compression.
Then it is a balance. The browser will have to uncompress the data, that is a little extra work but it also has to deal with downloading less data originally. If you have a old browser on an old, slow machine then it probably doesn't say that it can handle compressed data so it will behave just as before.
If the visitor has a browser which says it can handle compressed data but cannot managed it then they get a screenful of binary. This can happen, see the which browsers handle content-encoding? page from Michael Schroepl's configuring mod_gzip FAQ. It makes sense to serve compressed files where it is safe.
The second, more remote possibility is that if the modem is not actually managing error correction or data is corrupted in between the modem and the computer then the visitor won't just see a single strange character in the output, the remainder of the page may be garbled.
Compressed files can take 20% to 30% of an uncompressed file on the server's disc. HTML pages compress particularly well and if your website is dealing with a lot of static pages, particularly if they are large, the reduction in storage requirements can be most welcome.
Ace's Hardware has a nice article on 'Building a Better Webserver' which includes delivering compressed content as a central strategy.
Compressed files, when sent direct to browsers which can handle them in a compressed form, mean that you also make better use of your bandwidth.