[wp-trac] [WordPress Trac] #63842: Emoji detection inline script introduces needless parser/render blocking

WordPress Trac noreply at wordpress.org
Mon Oct 6 04:49:29 UTC 2025


#63842: Emoji detection inline script introduces needless parser/render blocking
-------------------------------------+-------------------------------------
 Reporter:  westonruter              |       Owner:  westonruter
     Type:  enhancement              |      Status:  closed
 Priority:  normal                   |   Milestone:  6.9
Component:  Emoji                    |     Version:  4.6
 Severity:  normal                   |  Resolution:  fixed
 Keywords:  has-patch has-unit-      |     Focuses:  javascript,
  tests                              |  performance
-------------------------------------+-------------------------------------
Changes (by westonruter):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"60902" 60902]:
 {{{
 #!CommitTicketReference repository="" revision="60902"
 Emoji: Move printing of emoji loader script module from `wp_head` to
 `wp_print_footer_scripts`.

 This removes ~3KB of HTML from the critical rendering path of markup in
 the `head`, thus marginally improving FCP/LCP in slower connections. It
 also fixes a Firefox issue with script modules by ensuring the emoji
 loader script module is printed after the `importmap`.

 Existing plugins that disable emoji by unhooking the action as follows
 will continue to work as expected:

     remove_action( 'wp_head', 'print_emoji_detection_script', 7 );

 Additionally, some obsolete `DOMReady` and `readyCallback` logic was
 removed. A script module (as it has a deferred execution) only ever
 executes when the DOM is fully loaded. This means there was no need for a
 `DOMContentLoaded` event which was removed in [60899], and the remaining
 ready detection logic can be removed.

 Follow-up to [60899].

 Developed in https://github.com/WordPress/wordpress-develop/pull/10145.

 Props westonruter, wildworks.
 Fixes #63842.
 Fixes #64076.
 }}}

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


More information about the wp-trac mailing list