Putting "javascript:" in front of code?

T

Thomas 'PointedEars' Lahn

Jim said:
Michael said:
For JavaScript, the MIME type is text/javascript [...]

Could you cite the relevant RFC which indicates this please? for
JavaScript (capatilised like that) the relevant one would be
application/x-javascript surely?

No for both answers. Alas, there is no standardized MIME type for
JavaScript code. Nevertheless, text/javascript is, in contrast to
application/x-javascript, widely supported and therefore used in
the HTML 4.01 Specification itself.


PointedEars
 
T

Thomas 'PointedEars' Lahn

Jim said:
Good for it, it has no change control or anything else over
javascript,

It is used in the Recommendation because it is widely supported.
The HTML WG has no more status than me or you on what is the mime-type
for js, you'll note the SVG WG say it's text/ecmascript.

You know that text/ecmascript targets a different language. Besides,
that is not standardized as well. Since the W3C does not watch over
either ECMAScript or JavaScript, as you wrote before (but ECMA does),
one of W3C's working groups is not the appropriate standardization
board to decide what is the proper MIME type for JavaScript. And last
but not least, what about

http://lists.w3.org/Archives/Public/www-svg/2002Aug/0008.html

?


PointedEars
 
L

Lasse Reichstein Nielsen

Thomas 'PointedEars' Lahn said:
The default script language is text/javascript in Mozilla/5.0 and
JScript (text/jscript?) in Internet Explorer.

Both text/jscript and text/javascript will work in IE. They both
trigger the same (JScrip) interpreter.
Second, the `javascript:' within the event handler is considered one of
the following:

A) UAs using the IE browser component: A label specifying the script
language
B) Other UAs: A label that is ignored since no statement refers to it.

It can, but then it will fail in IE.
C) Incorrect syntax, which triggers a script error.

Which will not happen in any browser I have seen, since it would require
the browser to interpret the contents as something other than Javascript,
and only IE allows other languages at all.
*That* is why it is wrong.

For some value of "wrong" :)
Third, `javascript:' is not a pseudo protocol (I would like give the
person who introduced that ridiculous term a good kick in the ass),
but an URI scheme.

So, http is a protocol, but http: is an URI scheme, correct?

/L
 
J

Jim Ley

It is used in the Recommendation because it is widely supported.

That doesn't work, so are lots of HTML features not included in the
spec.
You know that text/ecmascript targets a different language.

WHAT? what "different language" does it target?
Besides, that is not standardized as well.

Indeed, but it's widely supported... these should not be using any
examples that are wrong.

What about it? It's not different to what I was arguing here, it's
wrong for W3 WG's to recommend unregistered mime-types not in the x-
tree.

Jim.
 
D

Dr John Stockton

JRS: In article <[email protected]>, seen in
Thomas 'PointedEars' Lahn
Please shorten your attribution to one line, leaving
out information not vital to follow the discussion.

Please stop nagging on this matter.

There is no known support for your attitude in applicable standards
documents; nor in the Newsgroup FAQ.

Please also include in your own attributions sufficient material to put
the quoted material fully in context for those using off-line
newsreaders, when re-quoted in a further response.
 
R

Richard Cornford

Which will not happen in any browser I have seen, since it would
require the browser to interpret the contents as something other
than Javascript, and only IE allows other languages at all.
<snip>

According to my Netscape JavaScript 1.5 reference labels were introduced
in JavaScript 1.2 so in principal an environment supporting only
JavaScript <= 1.1 probably will consider event handling attribute code
prefixed with "javascript:" as a syntax error. But then, anyone still
using a JavaScript <= 1.1. UA is likely to be finding its use nearly
totally unproductive anyway.

Richard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top