SHARE
Facebook X Pinterest WhatsApp

Netscape 6, Part I: Detection and Scripting Page 3

Written By
thumbnail Yehuda Shiran
Yehuda Shiran
Jul 20, 2010
ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More



The introduction of Netscape 6 has worsen the browser-independent scripting situation, at least for the short time. No longer do you have to deal with only two browsers – there are now three major browsers to support. One good old way is to use if statements. You want to make your script as generic as possible, and use if clauses as late as possible. The following script uses this technique. The switchEntries() function is a common event handler for all browsers. The content of switchEntries() is an if statement that executes a different statement for every browser:


Al Gore
George W. Bush



Click the button below to see how the first option changes on the fly:

Al Gore
George W. Bush

Avoiding Netscape’s Proprietary Features

Netscape 6 does not support the LAYER and ILAYER elements. It means that the browser will silently ignore the , , , and tags. The browser will render the HTML page as if those tags are not present. Any other elements (non-LAYER) between and will be rendered as if the and are missing. Obviously, this will change the look of the page. Let’s take an example. The following LAYER element includes one line of text:


In Netscape Navigator, this line should be colored tan. Should be white in Netscape 6 and IE.

Here is the rendering of this element on your browser:

In Netscape Navigator, this line should be colored tan. Should be white in Netscape 6 and IE.

Recommended for you...

What Is a Container? Understanding Containerization
What Is a Print Server? | How It Works and What It Does
Nisar Ahmad
Dec 8, 2023
What Is a Network Policy Server (NPS)? | Essential Guide
Virtual Servers vs. Physical Servers: Comparison and Use Cases
Ray Fernandez
Nov 14, 2023
ServerWatch Logo

ServerWatch is a top resource on servers. Explore the latest news, reviews and guides for server administrators now.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.