Netscape 6, Part I: Detection and Scripting

By Yehuda Shiran (Send Email)
Posted Dec 5, 2000


In this column we'll introduce the new Netscape 6. This is a significant milestone in the history of browser development, as it is based on open standards, and on software modules that are being developed by everyone who wants to get involved. In the long run, Netscape 6 may draw other browsers to follow the W3C standards more rigorously, and we'll all benefit from it. In the short run, though, we all need to modify our Web sites to support the new browser. Instead of two major browsers we got used to (Internet Explorer and Netscape Navigator), we need to account for the new kid on the block, Netscape 6. At least until Netscape Navigator fully retires, which may take a year or so.

In this column we'll introduce the new Netscape 6. This is a significant milestone in the history of browser development, as it is based on open standards, and on software modules that are being developed by everyone who wants to get involved.

Notice that Netscape opted to drop Navigator from the new browser name. When we refer in our columns to Netscape Navigator, we mean Netscape Navigator 4.x. Obviously, Netscape positions Netscape 6 as two generations above Netscape Navigator, and one generation above Internet Explorer 5.x

In this column we'll get you started on how to support Netscape 6. We'll first explain some related buzzwords such as Mozilla and Gecko. We'll teach you how to detect Netscape 6, and how to write browser-independently. Then, we'll show you which Netscape Navigator features and which Internet Explorer features are not supported by Netscape 6. We'll outline which constructs to avoid when starting a new programming project.

In this column, you will learn:

  • How to distinguish between Mozilla and Gecko
  • How to detect Netscape 6
  • How to write three-way browser-independent code
  • How to avoid Netscape Navigator proprietary features
  • How to avoid Internet Explorer proprietary features

How to tell a Mozilla from a Gecko

Netscape 6 is Mozilla- and Gecko-based. Gecko is the next-generation browser engine which supports open Internet standards such as HTML, CSS, W3C DOM, XML, RDF, and JavaScript. It is mainly a layout engine, but it also includes a set of complementary browser components that make up the Mozilla engine as well as other browsers. A layout engine takes content (HTML, XML, Image Filters), and formatting information (CSS, HTML tag attributes), and renders it on the screen. It is responsible for filling the browser's content area inside the browser's window. Gecko is also used to create the browser's user interface, including menus, toolbars, etc. The motivation behind Gecko's development is to build a more interactive browser, and to give developers greater presentation control, using open and public Internet Standards.

Netscape bets heavily on Gecko. It powers all the individual components, including Navigator and Messenger. Gecko is designed to power the display of Netscape.com, enabling a much faster content display. Because it is small and open source, other companies may use it as well. Personal and other data assistants that connect to the Internet, can benefit from Gecko's Web browsing functionality. Many software developers are looking for Web browsing capability in their application, but want to avoid developing a new browser from scratch. These developers can choose the browser components they want from among the Gecko's offerings and package them to suit their specific needs.

Gecko does not package the interface modules in a coherent, user friendly Web browser application. It's done by the Mozilla browser, developed by the mozilla.org organization. The Mozilla browser can by downloaded for free from the mozilla.org site. Vendors will assemble their own Gecko-based browsers. Some will rely on the Mozilla browser. Netscape 6 is an example of a browser (by Netscape) that is both Mozilla- and Gecko-based.

Gecko includes the following components:

  • Document parser (handles HTML, XML, and arbitrary document types)

Page 1 of 6


Comment and Contribute

Your name/nickname

Your email

(Maximum characters: 1200). You have characters left.