Meta tag for scripting language

Discussion in 'Javascript' started by Robert Scheer, Dec 30, 2003.

  1. 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
     
    Robert Scheer, Dec 30, 2003
    #1
    1. Advertising

  2. (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 -
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
     
    Lasse Reichstein Nielsen, Dec 30, 2003
    #2
    1. Advertising

  3. Robert Scheer

    Jim Ley Guest

    On Tue, 30 Dec 2003 16:49:01 +0100, Lasse Reichstein Nielsen
    <> wrote:

    > (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/
     
    Jim Ley, Dec 30, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shruds
    Replies:
    1
    Views:
    836
    John C. Bollinger
    Jan 27, 2006
  2. Geoff Ball

    Re: Language META Tag

    Geoff Ball, Jul 9, 2003, in forum: HTML
    Replies:
    2
    Views:
    399
    Ernest Cline
    Jul 9, 2003
  3. DU

    Re: Language META Tag

    DU, Jul 9, 2003, in forum: HTML
    Replies:
    0
    Views:
    425
  4. Ron Stephens
    Replies:
    23
    Views:
    2,859
    Ron Stephens
    Apr 12, 2004
  5. DaveInSidney
    Replies:
    0
    Views:
    424
    DaveInSidney
    May 9, 2005
Loading...

Share This Page