Comments on: Making a Better Use of Script Tags http://www.terminally-incoherent.com/blog/2008/09/10/making-a-better-use-of-script-tags/ I will not fix your computer. Tue, 04 Aug 2020 22:34:33 +0000 hourly 1 https://wordpress.org/?v=4.7.26 By: Luke Maciak http://www.terminally-incoherent.com/blog/2008/09/10/making-a-better-use-of-script-tags/#comment-10176 Mon, 15 Sep 2008 13:54:55 +0000 http://www.terminally-incoherent.com/blog/2008/09/10/making-a-better-use-of-script-tags/#comment-10176

@Adam Kahtava: True. I see many people skip it altogether.

But, W3c lists it as a required attribute so if you skip it, your code may no longer validate.

Reply  |  Quote
]]>
By: Adam Kahtava http://www.terminally-incoherent.com/blog/2008/09/10/making-a-better-use-of-script-tags/#comment-10175 Mon, 15 Sep 2008 13:25:05 +0000 http://www.terminally-incoherent.com/blog/2008/09/10/making-a-better-use-of-script-tags/#comment-10175

But most browsers choose JavaScript by default. It doesn’t really matter what your type attribute contains – unless you’re using vbscript.

Reply  |  Quote
]]>
By: Luke Maciak http://www.terminally-incoherent.com/blog/2008/09/10/making-a-better-use-of-script-tags/#comment-10173 Mon, 15 Sep 2008 13:12:17 +0000 http://www.terminally-incoherent.com/blog/2008/09/10/making-a-better-use-of-script-tags/#comment-10173

[quote post=”2641″]Ever wonder why we even need a type attribute in the script tag?[/quote]

Well, it’s there to specify the MIME type of the script you are importing/embedding. Naturally as it goes with stuff like that, there is an intense flame war about whether you should use text/javascript or application/javascript. :P

Oh, and you can use the script tag to embed client side vbscript in which case you’d use text/vbscript although I haven’t really seen that being done much these days.

Reply  |  Quote
]]>
By: Adam Kahtava http://www.terminally-incoherent.com/blog/2008/09/10/making-a-better-use-of-script-tags/#comment-10172 Mon, 15 Sep 2008 11:40:18 +0000 http://www.terminally-incoherent.com/blog/2008/09/10/making-a-better-use-of-script-tags/#comment-10172

John is the man! jQuery is efff’n awesome!

Ever wonder why we even need a type attribute in the script tag?

Reply  |  Quote
]]>