• Advertisement
Sign in to follow this  

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

This topic is 4721 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
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