Specifying the version in type attribute of type "application/javascript" should be supported. Actually a script with version extension in the type attribute is not executed. This should be supported: <script language="javascript1.6" type="application/javascript;version=1.6"> This is already supported: <script language="javascript1.6" type="application/javascript"> Also the version specification should be used to switch ON/OFF language specific features like new key words as introduced in JavaScript 1.7 or implementation variants like the Array constructor of JavaScript 1.2.
<rdar://problem/6474778>
According to the IETF's ECMAScript Media Types Updates as of May 2022, the RFC-4329 is obsolete. Link - https://datatracker.ietf.org/doc/rfc9239/ StackOverflow - https://stackoverflow.com/questions/876561/when-serving-javascript-files-is-it-better-to-use-the-application-javascript-or ******** The media type registrations herein are divided into two major categories: (1) the sole media type "text/javascript", which is now in common usage and (2) all of the media types that are obsolete (i.e., "application/ecmascript", "application/javascript", "application/x-ecmascript", "application/x-javascript", "text/ ecmascript", "text/javascript1.0", "text/javascript1.1", "text/ javascript1.2", "text/javascript1.3", "text/javascript1.4", "text/ javascript1.5", "text/jscript", "text/livescript", and "text/ x-ecmascript"). ******** I am not sure whether Safari currently support "application/javascript" as of right now but I think based on latest standard, there is no need to add old attribute support. Can this be marked accordingly? Thanks!
Yeah, this works per HTML5 spec: https://mimesniff.spec.whatwg.org/#javascript-mime-type