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.
Get Perl Graphics Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.