Jump to content
  • Advertisement
Sign in to follow this  
johnnyBravo

[web] Whats the use of calling script type="text/javascript"?

This topic is 4906 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I was wondering why does everyone call the script tags like so:
<script type="text/javascript">
Like it knows that its javascript either way, why should we bother putting in the text="js etc" thanks

Share this post


Link to post
Share on other sites
Advertisement
And how does it know that it is javascript? I agree that most <script> tags are referring to JS but sometimes a strange webmaster may choose to use VBScript or some obscure thing like that. And the text part is probably useless.

At least that's what I think :).

Cheers!

Share this post


Link to post
Share on other sites
The script could be of other types, such as text/vbscript (if you're running an ASP-enabled web server), and other languages could be supported in the future.

Share this post


Link to post
Share on other sites
Quote:
Original post by fyhuang
And the text part is probably useless.
MIME, Multipurpose Internet Mail Extensions, categorizes all data according to five media types: text, image, audio, video and application (for application-specific or executable). This allows mail handlers to determine which applications to invoke, by default, to handle the content or how to display it. The MIME classifications have been coopted by XHTML because it strives to be a generic web content structure description language (with presentation elements pushed off to CSS).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!