[wp-trac] [WordPress Trac] #58663: Emoji: Consider eliminating expiry-based invalidation of wpEmojiSettingsSupports sessionStorage cache

WordPress Trac noreply at wordpress.org
Wed Jun 28 20:06:06 UTC 2023


#58663: Emoji: Consider eliminating expiry-based invalidation of
wpEmojiSettingsSupports sessionStorage cache
-------------------------------------+--------------------
 Reporter:  westonruter              |      Owner:  (none)
     Type:  defect (bug)             |     Status:  new
 Priority:  lowest                   |  Milestone:  6.3
Component:  Emoji                    |    Version:  trunk
 Severity:  trivial                  |   Keywords:
  Focuses:  javascript, performance  |
-------------------------------------+--------------------
 Currently the results of the emoji-loader's tests for whether or not emoji
 are supported get cached in the browser's `sessionStorage` for 1 week. For
 most users, this expiration will never be reached since the browser tab
 would be closed and the `sessionStorage` cleared anyway. For the minority
 of users who keep a single tab open for weeks at a time, including those
 who restore tabs after installing an OS update, there can be scenarios
 where (1) the OS was updated to support emoji but the cache causes Twemoji
 to still be loaded, or (2) the emoji support was not changed and yet the
 browser re-checks support after a week unnecessarily.

 See [https://github.com/WordPress/wordpress-
 develop/pull/4562#discussion_r1243983163 GitHub pull request discussion]
 for more context and possible solutions.

 Nevertheless, as of #58472 the emoji tests have been greatly optimized so
 the cost of re-calculating support unnecessarily is not a meaningful
 performance hit, especially since ever since emoji support was introduced
 until now, the tests were being run on every page load anyway. This may
 not be worth the effort to resolve.

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


More information about the wp-trac mailing list