JavaScript Resources

Compatibility

JavaScript, like HTML, is available in different versions. The current standard is JavaScript 1.3. (1.5 has been released with Netscape 6. There is no version 1.4). Each version of each web browser (Netscape, Internet Explorer, AOL, etc.) recognizes a different version of JavaScript; the older the browser, the fewer features available to you as a developer.

Bill Gates and Co. market their own particular brand of client-side script for Internet Explorer. They call it JScript. Technically speaking, "JavaScript" is the client-side scripting language for Netscape while "JScript" is the equivalent for Internet Explorer.

As far as the language goes, JScript is functionally the equivalent of JavaScript. There are, however, some syntax differences between these two languages that you only need worry about in advanced scripting, such as DHTML. Although there is very little difference between the syntax of the languages implemented across the major browsers, there are, however, significant differences among the Document Object Models (DOMs) available to each browser, i.e. the parts of the web page, window, and conceptual objects that you are able to interact with. If you are not sure what a DOM is, don't worry we will be discussing it in detail in class.

Since most users are surfing with Netscape /Internet Explorer versions 4.0 or greater, most JavaScript developers develop for the lowest common denominator, i.e., use syntax and DOM that is compatible with both version 4.0 of Netscape and version 4.0 of Internet Explorer for both Mac and PC. This will assure that the widest possible audience will be able to enjoy the dynamic content on your site.

In this course, this is precisely the hybrid of JavaScript and the Document that we will learn. Beyond this, I am not going to focus much on compatibility issues since I believe that it is much more important to learn how to walk before you run, i.e. learn how to build scripts in JavaScript first and then worry about how to make these scripts portable. When you are ready to further explore compatibility issues, here are a few good resources:

  • Browser Usage Stats
    IE is by far the most common browser and gaining percentage points.

  • Platform Stats
    I think the Mac numbers are a bit underestimated (there are a lot of users in the Education world), but anyway you slice the pie PCs are the big winner.

  • JavaScript Version Chart
    Here is a listing of the most common web browsers and a chart displaying the version of JavaScript or JScript that each understands. It is also useful for charting other features.

  • Full List of Browsers
    keep in mind that there are other browsers out there besides IE and Netscape.

  • All Document Object Models
    The best way to grapple with compatibility issues across DOMs is to make sure that you have a good DOM compatibility chart. This is the best one on the market. It includes cross-browser/hybrid DOMs as well as IE 5.5 and Netscape 6 DOMs. It is zipped and in PDF format.