[wp-trac] [WordPress Trac] #12009: Add support for HTML 5 "async" and "defer" attributes

WordPress Trac noreply at wordpress.org
Mon Mar 6 14:14:48 UTC 2023


#12009: Add support for HTML 5 "async" and "defer" attributes
---------------------------+-----------------------------
 Reporter:  Otto42         |       Owner:  azaozz
     Type:  enhancement    |      Status:  reopened
 Priority:  normal         |   Milestone:  Future Release
Component:  Script Loader  |     Version:  4.6
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+-----------------------------

Comment (by 10upsimon):

 Work has commenced on a solution that takes into consideration the
 original essence of this Trac ticket, along with many of the suggestions
 made via various - and very valid - comments herein, particularly the
 comment at https://core.trac.wordpress.org/ticket/12009#comment:75.

 Said work that is currently underway introduces enhancements to the
 Scripts API that allow loading strategies to be applied to scripts (and
 inline scripts) during registration. Supported strategies are as follows:

 * blocking (current default, not necessary to specify)
 * defer
 * async

 Strategies will be applied in a “most eligible” manner, based on various
 business rules such as the scripts dependency tree & inline script
 associations to name but two.

 More context on this feature can be found in the
 [https://make.wordpress.org/core/2022/12/09/enhancing-the-scripts-api-
 with-a-loading-strategy feature proposal blog post].

 Interested parties are encouraged to follow the ongoing development in the
 [https://github.com/10up/wordpress-develop 10up WordPress development
 repository] by following issues & pull requests labeled
 “[https://github.com/10up/wordpress-
 develop/labels/Script%20Loading%20Strategy Script Loading Strategy]”.

 Any early feedback is much appreciated.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/12009#comment:83>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list