[wp-trac] [WordPress Trac] #55126: Twenty Sixteen: Replace frontend jQuery usage with vanilla JS

WordPress Trac noreply at wordpress.org
Wed Feb 9 16:04:02 UTC 2022

#55126: Twenty Sixteen: Replace frontend jQuery usage with vanilla JS
 Reporter:  sergiomdgomes  |      Owner:  sergiomdgomes
     Type:  enhancement    |     Status:  assigned
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Bundled Theme  |    Version:
 Severity:  normal         |   Keywords:  needs-patch
  Focuses:  javascript     |
 `jQuery` is a large library, at around 90KB uncompressed, or 30KB gzipped.
 To make matters worse, it's usually enqueued in the head, and thus becomes
 part of the critical path, delaying first paint and subsequent metrics.

 Nowadays, the library is being enqueued for relatively little gain in many
 situations, given that the platform supports much of the functionality.
 Twenty Sixteen is an example of this, as it's relatively trivial to
 reimplement its functionality in native JS.

 This ticket focuses on removing jQuery as a frontend dependency for Twenty
 Twelve - specifically the frontend, as for example in the Customizer
 `jQuery` is loaded anyway (and performance is a bit less of a concern

 See also #54171 and #54172, which do the same for other themes.

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

More information about the wp-trac mailing list