Meta tag for scripting language

R

Robert Scheer

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
 
L

Lasse Reichstein Nielsen

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
 

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,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top