• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

14.2. HTML

14.2.1. About HTML and Compression

A slight amount of waste is intrinsic to HTML, because HTML is written in ASCII text. ASCII is defined as using only seven bits of each byte, so one bit in eight, or 12.5%, is wasted. A larger amount of waste is due to the fact that text is highly compressible, but no compression is used for most HTTP transfers. It is normal for a text compression program to reduce the size of a text file by half, meaning that file can then be downloaded in half the time. Right now, transmission bandwidth is the bottleneck and CPU power for decompression is cheap, so compressing web pages would seem to make sense, even if it would make debugging problems harder.

Lack of compression is not an issue for small pages, but large text pages can be sent significantly more quickly in compressed format to a browser that understands gzip compression, for example. (I believe Mosaic is the only popular browser that understands gzip.) Another option is to compress your content and configure your web server to use a certain MIME type for that compressed content, but you then have to ask your users to configure their browser to launch the decompression utility when a file with a certain content type is received. This requires a bit of work on both the client and server side.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint