This is great in all modern browsers.
The only browser that received the <script id> was Netscape 4, which we stopped caring about a long time ago.
This quirksmode page looks badly outdated, which with its use of the language , script <!-- attributes <!-- hidden by application/x-javascript . His advice on avoiding <script> in <body> (and putting it in <head> ) is not consistent with today's encouraged practices.
If we are talking about compatibility issues with <script> attributes: defer doesn't work everywhere, so don't rely on it; charset does not work everywhere, and neither the charset parameter on the served script is Content-Type, so your script encoding does not fit the page better; type should always be text/javascript , and not one of the non-working alternatives that pedants who wrote RFC 4329 would like to use.
bobince Apr 29 '10 at 23:51 on 2010-04-29 23:51
source share