|
|
|
Browsers are not created equal. Make sure everyone sees your page at its best.
Click Here to see a
80KB bitmap image of artwork
which goes with this article, entitled:
Two Views of the Same Page
There are plenty of great pages on the Web--and then there are the rest. Considering that you need some design sense, coupled with the skills of a writer and a programmer to build a superior Web page, that's not too surprising. The writing skills you might expectbut programming?
HTML isn't quite a programming language, but when you're designing a Web page, you're faced with the same dilemma as a programmer writing for many different platforms. To make sure your page looks good to any Web user, you'll need to test it at least on the two most popular browsers, Netscape and Internet Explorer.
Until recently, many of the Web's coolest features worked only in Navigator 2.0. The list of goodies goes on and on: framed windows, animated .GIFs, Java applets, JavaScript (similar in function to CGI scripts but far superior), and browser plug-ins like Shockwave, a 3-D animation and sound viewer. Version 3.0 of Internet Explorer will include all of those features as well, along with its own proprietary ActiveX controls and VBScript.
The trick to using any browser-specific feature is to make sure that it degrades gracefully if a different browser is used. Let's say you want to use Internet Explorer's marquee tag to display a message, but you don't want Netscape users to be left out in the cold. If the page background is white, avoid a marquee that uses white text on a dark marquee background--otherwise, when Netscape displays the page, it will show white text on a white background. Like a polar bear in a snowstorm, it's kind of hard to see.
Or suppose you want to use an animated .GIF file to display a flashing traffic light in Netscape. There are two ways to make this work with Internet Explorer. The simplest method is to choose a first frame for the animated .GIF that looks acceptable as a static image. IE will display the first frame without any extra work on your part. You can also convert the animated .GIF to an .AVI file, then use an image (IMG) tag with both the source (SRC) and dynamic source (DYNSRC) options. Netscape will use SRC to load the animated .GIF, while Internet Explorer will give precedence to DYNSRC and load the .AVI file instead. It's obviously a bit more work to optimize the same HTML file for both browsers.
A second option is to write two sets of files, one for "advanced" browsers like Navigator and Internet Explorer, and one for "plain vanilla" browsers that don't support frames or other advanced features. You can let your users choose the advanced interface, or use JavaScript or server-side CGI to automatically change the interface based on browser capabilities. Either way, you're left with the tedious task of maintaining two nearly identical sets of HTML pages.
Before building browser-specific pages, consider your audience. If you're building a Web site for users of all types of computer systems, it's probably not a good idea to assume that they all have a specific browser. Instead, you should stick to the basic HTML tags.
On the other hand, if you're writing pages for a corporate intranet and your company has adopted Windows 95 and Netscape Navigator, you can use any Netscape-specific feature without worry.
To learn more about browser-specific features, check out our Web Publishing Tips. You'll find a quick lesson on HTML authoring and many examples of browser-specific features for Netscape and Microsoft browsers.
And one final word of advice: Don't go hog-wild with dazzling features. Blinking text or a scrolling marquee can certainly grab someone's attention when used judiciously, but too much of a good thing can rapidly become an annoyance rather than an attraction.
|
|
|