Appendix A. Serving Graphics on the Web
When creating graphics, it’s good to keep in mind that not all web
browsers handle all “standard” HTML features in the same way. At various
times, different browsers have had their own idiosyncratic
interpretations of the ALT tag, client-side image maps, the usemap attribute, GIF89a animation, image
spacing attributes, transparency, inline PNG/XBM/Progressive-JPEG
images, the lowsrc tag, borders on
image links, alignment tags, and scaling tags. In short, many features
that should have a standard implementation have had different levels of
compliance to the standard on different browsers.
You can retrieve a good deal of information about the user agent
that is looking at your web page. You may want to know which browser the
client is using (accessible through the HTTP_USER_AGENT environment variable), or the
MIME types that the client accepts. Some web servers offer options for
modifying the image request negotiation process to accommodate different
browser capabilities, so browsers that can’t see PNG files are
automatically sent a GIF version instead, for example. Consult your web
server’s documentation for these features.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access