[wp-trac] [WordPress Trac] #12009: Add support for HTML 5 "async" and "defer" attributes
WordPress Trac
noreply at wordpress.org
Wed May 10 23:24:19 UTC 2023
#12009: Add support for HTML 5 "async" and "defer" attributes
-------------------------------------------------+-------------------------
Reporter: Otto42 | Owner: 10upsimon
Type: enhancement | Status: assigned
Priority: high | Milestone: 6.3
Component: Script Loader | Version: 4.6
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests 2nd- | Focuses:
opinion | performance
-------------------------------------------------+-------------------------
Comment (by azaozz):
While looking around for the above comment I also tried to find some
comparison data for page load speed with blocking vs. defer vs. async
scripts. Unfortunately I couldn't. Ended up doing some quick testing with
a 100KB HTML with five scripts ~10KB each. The defer and async scripts
were loaded in the head, the blocking scripts were concatenated and loaded
in the footer.
The result was somewhat surprising: blocking vs. defer vs. async
differences of page load (until DOM ready) were less than 3%. Perhaps I
didn't set the test up properly or testing on local serer is not good
enough.
Thinking it would be really good to have some performance comparison to
justify this. Ideally testing would be on a remote server, with and
without browser cache, with concatenated "blocking" scripts (as in
production), and on HTTP/1.1 and HTTP/2.0 if possible.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/12009#comment:102>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list