Meta tag for scripting language

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robert Scheer

    #1

    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
  • Lasse Reichstein Nielsen

    #2
    Re: Meta tag for scripting language

    rbscheer@my-deja.com (Robert Scheer) writes:
    [color=blue]
    > 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?[/color]

    Those that use intrinsic events (onclick etc.).
    [color=blue]
    > If I declare it, will I still need to create my scripts this way?
    > <script type='text/javascript'>[/color]

    Yes. The type attribute is required on script elements. The
    Content-Script-Type is used for the scripts inside intrinsic event
    handlers.
    [color=blue]
    > Is there any advantage/disadvantage when using it?[/color]

    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 - lrn@hotpop.com
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
    'Faith without judgement merely degrades the spirit divine.'

    Comment

    • Jim Ley

      #3
      Re: Meta tag for scripting language

      On Tue, 30 Dec 2003 16:49:01 +0100, Lasse Reichstein Nielsen
      <lrn@hotpop.com > wrote:
      [color=blue]
      >rbscheer@my-deja.com (Robert Scheer) writes:
      >[color=green]
      >> 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?[/color]
      >
      >Those that use intrinsic events (onclick etc.).[/color]

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

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

      Comment

      Working...