HTML Image Tips

Images are what makes the Web so popular using Netscape or Mosaic. But they take up a lot of bandwidth on the net, and often the amount of information in the pictures is very small. With a bit of thought, inline images can take much less space and still get the message across. Small images load faster, don't jam up the Internet, and everybody benefits.

Note: A patent on the LZW compression algorithm is held by Unisys; see PNG conversion

Techniques for reducing net load from HTML documents

Serving inline JPEGs

Although Netscape and now Mosaic 2.6 support inline JPEGs, earlier versions of Mosaic did not, so they were not much used. One way around this is to use a CGI script to examine the value of HTTP_USER_AGENT returned from the browser, and return an appropriate image file.

A better way is to use the emerging Content-Type negotiation scheme. Browsers such as Arena can interact with servers such as Apache to negotiate for which version of a file to serve.

Examples

Here are some example images.
Here are some examples using Content-Type negotiation.
Here are some examples using X-ALTSRC.

X-ALTSRC tag

Another emerging standard that addresses the problem is the X-ALTSRC tag. It is used as a modifier in the IMG construct, eg.
<IMG
X-ALTSRC="image/x-art;triangle.art"
X-ALTSRC="triangle.tif"
SRC="triangle.gif"
ALT="Warning:"
$gt;

References

Tar file of this document tree.


Vancouver Webpages


Remove an Entry
[Home] [Problems?] Copyright Status
Webpages Admin