470,618 Members | 1,698 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,618 developers. It's quick & easy.

Meta tag for scripting language

Hi.

I have some doubts about this meta tag:
<META http-equiv="Content-Script-Type" content="text/javascript">

Do I really need to declare this meta tag in all my pages?

If I declare it, will I still need to create my scripts this way?
<script type='text/javascript'>

Is there any advantage/disadvantage when using it?

Thanks,
Robert Scheer
Jul 20 '05 #1
2 1191
rb******@my-deja.com (Robert Scheer) writes:
I have some doubts about this meta tag:
<META http-equiv="Content-Script-Type" content="text/javascript">

Do I really need to declare this meta tag in all my pages?
Those that use intrinsic events (onclick etc.).
If I declare it, will I still need to create my scripts this way?
<script type='text/javascript'>
Yes. The type attribute is required on script elements. The
Content-Script-Type is used for the scripts inside intrinsic event
handlers.
Is there any advantage/disadvantage when using it?


It is required by the HTML specification. Browsers don't really
care. They default to Javascript is nothing else is written.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2
On Tue, 30 Dec 2003 16:49:01 +0100, Lasse Reichstein Nielsen
<lr*@hotpop.com> wrote:
rb******@my-deja.com (Robert Scheer) writes:
I have some doubts about this meta tag:
<META http-equiv="Content-Script-Type" content="text/javascript">

Do I really need to declare this meta tag in all my pages?


Those that use intrinsic events (onclick etc.).


If and only if you're using HTML 4 or XHTML 1.0, not if you're using
other HTML's.

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.