Why GOV.UK’s jQuery removal matters for performance

In March 2022, GOV.UK announced that it had removed jQuery from its front end entirely. For a site that serves government services and information across the United Kingdom—on all kinds of devices and connection quality—that’s not a trivial cleanup task. It’s a decision made with performance and accessibility in mind, and the reported results are a useful case study for any team still carrying legacy JavaScript dependencies.

Jeremy Wagner

The case for dropping jQuery

jQuery has been a staple of web development for good reason. Roughly a 30 KiB dependency, it was used by nearly 84% of mobile pages in 2021, according to the HTTP Archive. Its value was in smoothing over inconsistent browser implementations of DOM manipulation, event handling, animations, and element selection.

The platform has since caught up. Native browser APIs now provide most of what jQuery once offered:

  • CSS selector-based element selection via querySelector and querySelectorAll
  • Class manipulation through the classList API
  • Event handling with addEventListener on elements, document, and window

That overlap makes the question obvious: is jQuery still necessary? GOV.UK’s answer was no, and their experience provides a clear performance rationale.

The measurable impact

Matt Hobbs, who works on GOV.UK’s front end, detailed the results of the removal in a Twitter thread. The key takeaways:

  • Overall front end processing time decreased
  • Blocking time dropped by 11% at the 75th percentile
  • Blocking time dropped by 10% at the 95th percentile—users who already face the worst network and device conditions

Those numbers matter, especially for users on the edge of the performance curve. Removing a dependency that replaces native platform features can deliver measurable gains without sacrificing a single feature or interaction.

A model for dependency decisions

The GOV.UK team’s work is a useful reminder that every dependency costs something. Before reaching for a framework or library, it’s worth checking whether the web platform already provides the functionality you need. If it does, dropping the extra weight isn’t just a technical exercise—it’s a user experience improvement.