You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 'async-defer' load method adds both async and defer attributes to the script tag.
When both attributes are set, async takes precedence.
For classic scripts, if the async attribute is present, then the classic script will be fetched in parallel to parsing and evaluated as soon as it is available (potentially before parsing completes). If the async attribute is not present but the defer attribute is present, then the classic script will be fetched in parallel and evaluated when the page has finished parsing. If neither attribute is present, then the script is fetched and evaluated immediately, blocking parsing until these are both complete. [emphasis mine]
The defer attribute may be specified even if the async attribute is specified, to cause legacy web browsers that only support defer (and not async) to fall back to the defer behavior instead of the blocking behavior that is the default.
Based on global browser support, there doesn't appear to be a use-case for setting both attributes on any given script tag and we can safely deprecate/remove the async-defer load method option.
Acceptance Criteria
Remove support for the async-defer method.
Bump the plugin version to v2.0.0 since this is a breaking change.
Add to the release notes that support for this method has been removed, and that users should use async instead.
The text was updated successfully, but these errors were encountered:
kevinfodness
changed the title
Consider removing the 'async-defer' load method
Remove the 'async-defer' load method
Aug 21, 2024
Description
The
'async-defer'
load method adds bothasync
anddefer
attributes to the script tag.When both attributes are set,
async
takes precedence.source
Both of these attributes have > 98% global browser support
Based on global browser support, there doesn't appear to be a use-case for setting both attributes on any given script tag and we can safely deprecate/remove the
async-defer
load method option.Acceptance Criteria
async-defer
method.async
instead.The text was updated successfully, but these errors were encountered: