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

WordPress Trac noreply at wordpress.org
Tue Aug 19 20:14:37 UTC 2025


#63842: Emoji detection inline script introduces needless parser/render blocking
-------------------------+--------------------
 Reporter:  westonruter  |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  6.9
Component:  Emoji        |    Version:  4.6
 Severity:  normal       |   Keywords:
  Focuses:  performance  |
-------------------------+--------------------
 The inline script used for emoji detection, output in the `head` by
 `_print_emoji_detection_script()`, needlessly adds parser/render blocking
 to the page. If emoji loader already waits for `DOMContentLoaded` before
 it proceeds to load the add load the `wp-emoji.js` and `twemoji.js`
 scripts. This means the inline script need not be in the `head` at all. It
 could be moved to the footer, and it would also be better if it were added
 as an inline script module so that its execution is deferred until the DOM
 has loaded. Similarly, the emoji settings object exported from PHP need
 not be added as an inline script but it can instead be
 [https://core.trac.wordpress.org/ticket/58873#comment:4 output as JSON] to
 be parsed when the emoji detection script module executes.

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


More information about the wp-trac mailing list