innerjoin

innerjoin | apache-compression
Innerjoin Home Up Help

An HTTP Compression Whyto

Arguments for the Webmaster

Speed

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.

... but don't modems already do compression?

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.

Bandwidth

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.

What am I really going to see?

This depends on many things.

What if the visitor has an old, slow machine?

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.

What's the worst that can happen?

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.

Arguments for the hosting company

Space

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.

Bandwidth

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.

Navigation: [ Home ] [ Index ] [ Site Map ] [ Translate ] [ Up ] [ What's New ]
Mail: mgk@iv.mmv.innerjoin.org, 2002/09/10
URI: http://www.innerjoin.org/apache-compression/whyto.html
Keywords:innerjoinorg200112, innerjoinorg, innerjoin, apache, compression