Scripts have default type "application/javascript" and even old browsers interpret script tags without the type attribute as JavaScript scripts. On the other hand, the "text/javascript" MIME type is deprecated for JavaScript but explicitly specifying type="application/javascript" is not recognized by older IEs.
In other words, the only way to be both conformant to the spec and to not specify an obsolete MIME type is to omit the type attribute completely. Works everywhere and is less verbose so it's easier to read it.
Scripts have default type
"application/javascript"
and even old browsers interpret script tags without thetype
attribute as JavaScript scripts. On the other hand, the"text/javascript"
MIME type is deprecated for JavaScript but explicitly specifyingtype="application/javascript"
is not recognized by older IEs.In other words, the only way to be both conformant to the spec and to not specify an obsolete MIME type is to omit the
type
attribute completely. Works everywhere and is less verbose so it's easier to read it.