Previous Page
Next Page

JavaScript Versions

The scripting language that you think of as JavaScript has several different names (depending on whose product you have) and almost a dozen different versions. Besides JavaScript, there are also JScript and ECMAScript. Here's a guide to which version does what.

Netscape's JavaScript

The first version of JavaScript, originally called LiveScript, was first released in Netscape Navigator 2.0. Netscape intended LiveScript to be a way to extend the capabilities of browsers, and to allow Web designers to add some interactivity to their sites. The JavaScript version in Navigator 2.0 is JavaScript 1.0.

Along with Navigator 3.0 came JavaScript 1.1, which added support for images, arrays, Java applets, and plug-ins, among many other changes.

With the release of Navigator 4.0 (also known as Netscape Communicator), JavaScript 1.2 was born, with more enhancements and refinements. Netscape 4.5 later shipped with JavaScript 1.3. JavaScript 1.4 was server-side only, and Netscape 6 introduced JavaScript 1.5.

Current versions of JavaScript are being developed by the open-source Mozilla project, mainly for the benefit of its Firefox browser. Firefox (and its spinoffs, such as Camino for Mac OS X) uses ECMAScript-262 Edition 3 (see below), which corresponds to JavaScript 1.6 (Netscape 6 and later versions are based upon Mozilla). At press time for this book, the current version of JavaScript was 1.6.

Microsoft's JScript

As is so often the case, Microsoft implemented JavaScript in its own fashion, which is not always compatible with the Netscape version. Called JScript version 1, the Microsoft version of JavaScript was more-or-less compatible with JavaScript 1.0; there were some differences. Naturally, JScript appears only in versions of Microsoft Internet Explorer (MSIE).

On Windows, there was also a JScript version 2 (somewhat comparable to JavaScript 1.1) for Windows 95/NT that came with upgraded versions of MSIE 3.02 and later. Not all versions of MSIE 3.02 have JScript 2.0. In order to tell what version of JScript you have installed, search your disk for "jscript.dll". Get the file's properties, and click the Version tab. If the file version does not begin with at least 2, it's long past time to upgrade your browser.

On the Macintosh, MSIE 3.0 had no JScript, but version 3.01 did. That included JScript 1.0, but not the identical version as on Windows; there were differences between the Mac and Windows versions of JScript (for example, the Mac version supported the Image object for mouse rollovers, while the Windows JScript 1.0 did not). In 2003, Microsoft discontinued MSIE for Mac, ending official support in 2005.

Confused yet? You're in good company. But wait, there's more: MSIE 4.0 included JScript 3.0, and MSIE 5.0 included JScript 5.0. JScript 3.0 is roughly equivalent to JavaScript 1.2, and JScript 5.0 is roughly equivalent to JavaScript 1.5. MSIE 5.5 came with JScript 5.5, and MSIE 6.0 introduced JScript 5.6, both of which were only minor updates.

Some versions of Windows are also associated with particular JScript versions (JScript is one of the scripting languages that can be used to script Windows itself). Windows 2000 shipped with JScript 5.1. Windows ME contained JScript 5.5, and Windows XP uses JScript 5.6.

AOL

Which versions of JavaScript do AOL browsers support? Given that AOL owns Netscape, you might guess that it ships with that browser, but you'd be wrong, unless you're talking about AOL for Mac OS X. For contractual reasons, AOL uses Microsoft's Internet Explorer. Table A.1 shows which browsers shipped with which versions of AOL.

Table A.1. AOL/MS IE Browser Chart

AOL Version

16-bit PC

32-bit PC

Mac

3.0

3.0

3.0

2.1

  

3.01

 
  

3.02

 
  

4.01

 

4.0

3.0

n/a

3.01

5.0

 

n/a

4.01


According to AOL, the Mac (for Mac OS 9 and earlier) and 16-bit PC versions come with MSIE embedded into the client, but 32-bit PC versions since AOL version 3 can use whatever version of MSIE is on the user's system. Consequently, these folks may have anything from MSIE 3 to MSIE 6 or later installed. AOL for Mac OS X uses Netscape technology to provide an embedded browser, which from the JavaScript standpoint is functionally equivalent to Netscape 7.


Previous Page
Next Page