[thelist] Credibility of JScript

MRC webmaster at equilon-mrc.com
Mon Mar 18 18:16:02 CST 2002


Josh and Syed,

>> JScript is to Microsoft as JavaScript is to Netscape.  They are both
>> proprietary client side scripting languages based on ECMAScript
>> (ECMA-262).
[...]
> 1.    How are these two different in practical work?
> 2.    Which one is more reliable for internet?

    Actually, Javascript predates ECMAScript. But as ECMAScript is the
non-proprietary, theoretical standard, Javascript is the practical standard,
since essentially any script-enabled browser will understand it. Typically,
few browsers will execute a script with a type value of "text/ecmascript"
(unless they ignore the type attribute) or with a language value of
"ecmascript" (although this may change as standards-compliance becomes more
common).
    JScript is virtually identical to Javascript, and IE readily executes
scripts written in Javascript. There are a few minor differences between the
two languages, and most of those differences are to accommodate
Microsoft-centric technologies (such as inclusion of the ActiveXObject
object, the ScriptEngine Function, etc.). But non-Microsoft browsers likely
will not execute a JScript-labeled script.
    Two other significant points, although somewhat tangential: Microsoft
has always drawn a clear line of distinction between scripting languages and
the document object model, whereas Netscape, prior to Netscape 6, lumped
them together. This means that, historically, Netscape considered objects
such as document to be part of the scripting language, whereas Microsoft
considers it to be part of its browser dom. ECMA and W3C, respectively,
essentially concur with the Microsoft approach by excluding it from
ECMAScript but including it in the standard DOM. And by its adoption of
these standards in Netscape 6, Netscape now concurs, as well.
    Secondly, Microsoft has always implemented its scripting languages as
updatable components rather than hardwiring them into the browser. It is
theoretically possible to update IE 3 to JScript 5.5 -- but remember, this
is only the scripting engine, not the browser dom.
    So the rule of thumb for the Internet: always Javascript. There are
exceptions, but these must be implemented only with a clear understanding of
the target audience and of the drawbacks to doing so.

James Aylard




More information about the thelist mailing list