Read at your own risk
2011 October 1/10:32 PM
This document dates from the early web period, and is kept for archival purposes only. It is no longer updated, and contains much that is apocryphal, or at least wildly inaccurate.You have other options—if you’re willing to put more work or more money into it.
Server includes.
“Server-side includes” allow you to check the browser’s name (generally called “agent”) and “include” different html code, depending the browser. Most web servers have ways of doing this. It reduces your page speed, however, and requires learning yet another computer language.
Using server-side includes in this way also means that new browsers will not be able to take advantage of your pages, because your pages won’t know about the new browser, and will send it the “lowest common denominator” pages. This quandary led Microsoft, for example, to have their Internet Explorer pretend, when asked, to be Netscape.
Separate pages.
Keeping and maintaining separate pages for each browser is obviously one option. However, there are high-end “page database” programs that will write different site structures for each browser type.
Hardware includes.
You can also check the hardware platform on the other end. For example, you might want to include a “wave” sound if the browser is running on a PC, a “snd” sound if the browser is a Macintosh, and a Sun “au” for anyone else. The “agent” generally includes the name of the hardware platform. Here are some examples from older browsers:
- MacWeb 1.0, Macintosh: MacWeb/1.00ALPHA3.2 libwww/2.17
- Mosaic 2.0, Windows: NCSA Mosaic/2.0 (Windows x86)
- Netscape 1.2, Windows: Mozilla/1.22 (Windows; I; 16bit)
- Netscape 2.0, Windows: Mozilla/2.0 (Win16; I)