Skip to main content
This answer has flipped in correctness as of IETF 9239, updating.
Source Link
Warty
  • 7.4k
  • 1
  • 33
  • 51

Per this, Per IETF RFC 9239 text/javascript is obsolete. Usenow standard and application/javascript insteadis now considered obsolete.

text/javascriptThe media type registrations herein are divided into two major categories: (Obsolete1): JavaScript; Defined in and made obsolete the sole media type in RFC 4329"text/javascript", which is now in order to discourage itscommon usage in favorand (2) all of the media types that are obsolete application/javascript(i. Howevere., text"application/javascript is allowed in HTML 4 and 5 andecmascript", unlike application"application/javascriptjavascript", has cross"application/x-browser supportecmascript", "application/ x-javascript", "text/ecmascript", "text/javascript1.0", "text/javascript1.1", "text/javascript1.2", "text/ The "type" attribute of the tag in HTML5 is optionaljavascript1.3", "text/javascript1.4", "text/javascript1.5", "text/jscript", "text/livescript", and there is no need to use it at all since all browsers have always assumed the correct default (even in HTML 4 where it was required by the specification "text/xecmascript").

This standard is incompatible with IE<=8. See further notes in When serving JavaScript files, is it better to use the application/javascript or application/x-javascript

Per this, text/javascript is obsolete. Use application/javascript instead.

text/javascript (Obsolete): JavaScript; Defined in and made obsolete in RFC 4329 in order to discourage its usage in favor of application/javascript. However, text/javascript is allowed in HTML 4 and 5 and, unlike application/javascript, has cross-browser support. The "type" attribute of the tag in HTML5 is optional and there is no need to use it at all since all browsers have always assumed the correct default (even in HTML 4 where it was required by the specification).

This standard is incompatible with IE<=8.

Per IETF RFC 9239 text/javascript is now standard and application/javascript is now considered obsolete.

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/xecmascript").

See further notes in When serving JavaScript files, is it better to use the application/javascript or application/x-javascript

added 45 characters in body
Source Link
dthree
  • 20.6k
  • 14
  • 79
  • 112

Per this, text/javascript is obsolete. Use application/javascript instead.

text/javascript (Obsolete): JavaScript; Defined in and made obsolete in RFC 4329 in order to discourage its usage in favor of application/javascript. However, text/javascript is allowed in HTML 4 and 5 and, unlike application/javascript, has cross-browser support. The "type" attribute of the tag in HTML5 is optional and there is no need to use it at all since all browsers have always assumed the correct default (even in HTML 4 where it was required by the specification).

This standard is incompatible with IE<=8.

Per this, text/javascript is obsolete. Use application/javascript instead.

text/javascript (Obsolete): JavaScript; Defined in and made obsolete in RFC 4329 in order to discourage its usage in favor of application/javascript. However, text/javascript is allowed in HTML 4 and 5 and, unlike application/javascript, has cross-browser support. The "type" attribute of the tag in HTML5 is optional and there is no need to use it at all since all browsers have always assumed the correct default (even in HTML 4 where it was required by the specification).

Per this, text/javascript is obsolete. Use application/javascript instead.

text/javascript (Obsolete): JavaScript; Defined in and made obsolete in RFC 4329 in order to discourage its usage in favor of application/javascript. However, text/javascript is allowed in HTML 4 and 5 and, unlike application/javascript, has cross-browser support. The "type" attribute of the tag in HTML5 is optional and there is no need to use it at all since all browsers have always assumed the correct default (even in HTML 4 where it was required by the specification).

This standard is incompatible with IE<=8.

added 538 characters in body
Source Link
dthree
  • 20.6k
  • 14
  • 79
  • 112

Per this, text/javascript is obsolete. Use application/javascript instead.

text/javascript (Obsolete): JavaScript; Defined in and made obsolete in RFC 4329 in order to discourage its usage in favor of application/javascript. However, text/javascript is allowed in HTML 4 and 5 and, unlike application/javascript, has cross-browser support. The "type" attribute of the tag in HTML5 is optional and there is no need to use it at all since all browsers have always assumed the correct default (even in HTML 4 where it was required by the specification).

Per this, text/javascript is obsolete. Use application/javascript instead.

Per this, text/javascript is obsolete. Use application/javascript instead.

text/javascript (Obsolete): JavaScript; Defined in and made obsolete in RFC 4329 in order to discourage its usage in favor of application/javascript. However, text/javascript is allowed in HTML 4 and 5 and, unlike application/javascript, has cross-browser support. The "type" attribute of the tag in HTML5 is optional and there is no need to use it at all since all browsers have always assumed the correct default (even in HTML 4 where it was required by the specification).

Source Link
dthree
  • 20.6k
  • 14
  • 79
  • 112
Loading