Chapter 2
Navigator and Explorer: The World Wide Web on a Caffeine High


In This Chapter

The JavaScript Confusion

Readers of the first edition of this book may recall simpler times—when JavaScript and Netscape Navigator 2.0 were the only team in town. For better and worse, the world of JavaScript has changed since those halcyon days of year past. Two major notes mark the evolution of JavaScript in the past year:

The two points above have led to a fair amount of confusion among JavaScript authors and users. Talking about 2.0, 3.0. 1.1—it’s enough to drive someone into a dark corner with only a spoon and a brownie pie. Let’s try to clarify the situation.

A Not-So-Zen Look at Browsers 

Two versions of JavaScript are now on the market: 1.0 and 1.1. The previous edition of this book (The Complete Idiot’s Guide to JavaScript) covered JavaScript 1.0. This edition covers JavaScript 1.1, which is largely similar to its predecessor but sports a few additional features.

At the time of this writing, only Netscape Navigator 3.0 supported JavaScript 1.1. For this reason, throughout this coverage, I’ll denote any features of JavaScript that are new to version 1.1.

Both Netscape Navigator 2.0 and Microsoft Internet Explorer 3.0 support JavaScript 1.0. Therefore, any JavaScript programs that don’t include the new 1.1 features should work with both of these browsers.

Jscript versus JavaScript

To add further confusion to the brew, although it is said that Microsoft Internet Explorer 3.0 supports 
JavaScript 1.0, that is not wholly, technically true.

Microsoft did not design their JavaScript support based on the official reference documentation. Depending 
upon whom one believes, this was either because Netscape prevented Microsoft from accessing this
reference material or because Microsoft did not want to “get into bed” with Netscape. In any case, M
icrosoft decided to “reverse engineer” JavaScript—to observe how JavaScript behaves and then create
a programming language that behaves the same way. After doing so, Microsoft named their language “
JScript” because it is a copy of JavaScript but not the “real thing.” However, in their promotional press, 
Microsoft has vacillated, sometimes claiming that Internet Explorer supports “JScript” and other times 
saying that it supports “JavaScript.”

Ultimately, JScript, or whatever one calls it, is mostly compatible with JavaScript 1.0. This means that
most programs written in JavaScript 1.0 will work properly with both Netscape Navigator 2.0 and M
icrosoft Internet Explorer 3.0. However, in certain instances, JScript behaves different from JavaScript.
I’ll cover a few of those instances later in this book.

A Brief Editorial

One hopes that in the near future the disparities between versions of JavaScript and browser support will fade away. Without some assurance of consistency between browsers’ support for JavaScript, the language may face a dim future. Lack of standardization is the most fatal of flaws in technology. JavaScript’s future health and well-being depends upon its reliability across platforms and across browsers.

By the time you read this book, the situation described may have changed—hopefully for the better. In a best-case scenario, Microsoft will include full official support for JavaScript 1.1 in their next release of Internet Explorer. If so, readers of this book, all JavaScript authors, and all users of the Web will be better off. A recent announcement that Netscape has handed JavaScript over to an independent standards body may prove to be the solution, allowing future browser revisions to support JavaScript equally.

Up and Running

Whether you currently use Netscape Navigator or Microsoft Internet Explorer, it’s probably best to have both. If you need one or the other, you can get them from the Internet:

Netscape Navigator 2.02, 3.0, and 4.0 (also known as “Communicator” when available) can be found at http://www.netscape.com

If you choose to write JavaScript programs for Netscape 3.0 (JavaScript 1.1), remember that they will not work in Internet Explorer 3.0. Ideally, installing a copy of each browser (Netscape 2.0, 3.0, and Internet Explorer 3.0) provides the best environment for testing JavaScript programs. However, if you need to choose one, use Netscape Navigator 3.0 or 4.0, which support JavaScript 1.1. They lean more towards the future.

When it comes to configuring your browser to support JavaScript, there’s little to do. By default, each browser above installs with JavaScript support enabled. To enable or disable JavaScript (obviously, one wants to enable JavaScript to make use of this book), follow these instructions:

Browser Bias: Which JavaScript to Support?

Unfortunately, due to the currently inconsistent state of JavaScript support, you may need to decide which Web browser you “most” want to support.

To get the most out of this book, you’d write JavaScript programs that conform to version 1.1 (the subject of this book). In doing so, you support only Netscape Navigator 3.0 users.

If you write JavaScript programs that do not use version 1.1’s special features, Netscape Navigator 2.0 users will be able to view your program. Additionally, users of Microsoft Internet Explorer 3.0 may also be able to view these JavaScript programs. Then again, they may not; as I explained earlier, there are a few compatibility differences between Internet Explorer’s and Netscape Navigator’s JavaScript support!

Confusing as this is, here’s what it boils down to:

Our Bias

Yes, I’m biased. This is not a form of corporate loyalty or blind nationalism. Rather, simplicity. I’m writing this book with Netscape Navigator 3.0 in mind. Therefore, I’ll be covering JavaScript 1.1. Although I cannot comprehensively discuss every difference between JavaScript versions and browser support, I’ll make these two efforts:

The Least You Need to Know

Previous Chapter Next Chapter

Beginning of ChapterTable of ContentsBook Home PageQue Home Page


For comments or technical support for our books and software, select Talk to Us.
To order books, call us at 800-716-0044 or 317-228-4366.

1997, QUE Corporation, an imprint of Macmillan Publishing USA, a Simon & Schuster Company.