152Part IIIDocument Objects ReferenceListing 13-3: A Branching Index Page
Notice that the only visible content is an image surrounded by a standard link. The tag contains no background color or art. A single script statement is located in the Head. A
tag is also in the Head to automate navigation for some users. To see how a variety ofbrowsers respond to this page, here are what three different classes of browser do withListing 13-3: .A JavaScript-enabled browser.Although the entire page may load momentarily (at most, flashing the company logo for a brief moment), the browser executes the script state- ment that loads home1.htmlinto the window. In the meantime, the image is preloadedinto the browser s memory cache. This image should be reused in home1.htmlso thedownload time isn t wasted on a one-time image. If your pages require a specific browserbrand or minimum version number, this is the place to filter out browsers that don tmeet the criteria (which may include the installation of a particular plug-in). Use theproperties of the navigatorobject (Chapter 38 on the CD-ROM) to write a browser snifferscriptthat allows only those browsers meeting your design minimum to navigate to thescripted home page. All other browsers fall through to the next execution possibility. .A modern browser with JavaScript turned off or missing.Several modern browsersrecognize the special format of the
tag as one that loads a URL into the currentwindow after a stated number of seconds. In Listing 13-3, that interval is zero seconds. The
tag is executed only if the browser ignores the