async
The
async
anddefer
attributes are boolean attributes that indicate how the script should be evaluated. Classic scripts may specifydefer
orasync
, but must not specify either unless thesrc
attribute is present. Module scripts may specify theasync
attribute, but must not specify thedefer
attribute.
defer
The
defer
attribute may be specified even if theasync
attribute is specified, to cause legacy web browsers that only supportdefer
(and notasync
) to fall back to thedefer
behavior instead of the blocking behavior that is the default.
type
The default, which is used if the attribute is absent, is "
text/javascript
".