[wp-trac] [WordPress Trac] #12009: Add support for HTML 5 "async" and "defer" attributes
WordPress Trac
noreply at wordpress.org
Fri Oct 13 18:44:27 UTC 2023
#12009: Add support for HTML 5 "async" and "defer" attributes
-------------------------------------------+--------------------------
Reporter: Otto42 | Owner: joemcgill
Type: enhancement | Status: closed
Priority: high | Milestone: 6.3
Component: Script Loader | Version: 4.6
Severity: normal | Resolution: fixed
Keywords: has-patch commit has-dev-note | Focuses: performance
-------------------------------------------+--------------------------
Comment (by westonruter):
In [changeset:"56933" 56933]:
{{{
#!CommitTicketReference repository="" revision="56933"
Script Loader: Move delayed head script to footer when there is a blocking
footer dependent.
This prevents a performance regression when a blocking script is enqueued
in the footer which depends on a delayed script in the `head` (with
`async` or `defer`). In order to preserve the execution order, a delayed
dependency must fall back to blocking when there is a blocking dependent.
But since it was originally delayed (and thus executes similarly to a
footer script), it does not need to be in the head and can be moved to the
footer. This prevents blocking the critical rendering path.
Props adamsilverstein, westonruter, flixos90.
Fixes #59599.
See #12009.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/12009#comment:164>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list