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