Web Development
Is jQuery Dead Yet? A Retirement-Planning Guide
GitHub’s engineering team published an account last month of removing jQuery from GitHub.com’s front end entirely, and the milestone has restarted a conversation that visits every legacy codebase we maintain. Is jQuery dead, and are we embarrassed to be shipping it?
We have standing on the question, and disclose it warmly. Our September 2006 post greeted a brand-new library from John Resig with genuine enthusiasm, adopted it into practice immediately, and spent the following decade watching that call vindicate itself at internet scale. jQuery became the most deployed JavaScript in history and the shared tongue through which an entire generation, several of this team included, learned to script the web.
So the retirement question gets asked here with respect, and answered with the framing the whole category deserves and rarely gets. What happened to jQuery is not death but graduation.
querySelector is jQuery’s selector idea, standardized. Fetch is the network call it made civilized. Modern CSS transitions absorbed its animations. The DOM APIs learned its manners. The platform digested the library’s best ideas, which is the highest compliment the web pays its tools. The absorption pattern welcomes its most distinguished graduate.
The practical question that remains, what to do with the jQuery you are actually running, is retirement planning, not scandal management. It sorts cleanly by situation.
The situations, sorted
New builds: rarely justified. Starting a project in 2018, the native platform covers the daily verbs in every browser your analytics will show you. Selection, events, requests. Classes and transitions. And 30KB is 30KB, a real line in the script budgets the December cost analysis funded.
Our new-build default dropped jQuery quietly a couple of years ago. Not as policy theater, but as the budget doing its job. The exceptions, a dependency that requires it, a plugin genuinely worth its freight, pass through the same intake question as every dependency since the left-pad lesson. Does the value justify the tree?
Existing sites: removal projects rarely pay. The inverse case deserves equal bluntness, because ‘modernization’ engagements are being sold against exactly this anxiety. Working jQuery code is a functioning asset. Rewriting stable features in vanilla JavaScript delivers the same behavior at new-bug prices. A removal project justified by fashion is cost cosplaying as progress.
The performance case for removal is real only where measurement says so. The script-budget audit will tell you whether 30KB and its plugins are actually among your page’s problems. They are usually well behind the tag sprawl and image weight. And the maintenance case is real only at the plugin layer, which is where the genuine risk lives, and where this guide now goes.
The middle path, which is the actual plan
Stop adding. A one-line engineering policy: new features use platform APIs. jQuery is legacy-maintenance vocabulary, not new-build vocabulary. This freezes the dependency’s footprint at zero marginal cost and starts every future removal at a smaller number.
Remove opportunistically. When templates get rebuilt, components get redesigned, or features get revisited for their own reasons, the rewrite drops the dependency as a rider on work already justified. Over a site’s normal refresh cycle this retires most jQuery without ever funding a ‘jQuery project.’
Triage the plugin tier now, because that is the real risk. The aging jQuery plugin ecosystem is where jQuery sites actually get hurt, per the dependency rules’s maintenance-health layer. Inventory the plugins specifically. Check maintenance status and known CVEs. Replace the abandoned ones on a schedule, regardless of any broader jQuery position. An unmaintained plugin with DOM access is a liability wearing a UI.
Let WordPress be WordPress. The platform bundles jQuery, half the web ships it, and your theme and plugins likely assume it. Fighting the bundle buys nothing. The stop-adding rule applies to your custom code, and the bundled copy rides along at the platform’s discretion, which is the correct division of labor.
What the graduation teaches, beyond the library
The pattern will recur, and the vocabulary helps. The ‘is X dead’ genre that this industry manufactures quarterly is almost always asking the wrong question, and jQuery is the cleanest teaching case the category has produced. The library’s ideas won so completely that the library became optional, which the genre’s framing can only read as death, because its framing has no category for success.
The correct questions, transferable to every aging dependency in your site. Has the platform absorbed what this tool does? If yes, new code should use the platform. Is the existing usage stable and secure? If yes, it is an asset, not debt. Where is the actual maintenance risk? Almost always the ecosystem’s edges, not its core. And what does the calendar say? Absorption takes years, and planning beats reacting, per every retirement we have covered from Flash outward.
Answer those four and the ‘dead yet?’ anxiety resolves into a maintenance plan, which is all it ever should have been. Retirement done right is graduation, not scandal, and the industry would waste fewer budget cycles if its obituaries learned the difference.
A note from 2006
A personal note to close, which we permit ourselves roughly once per decade.
The 2006 post on this library was written in our first year, when ‘make the browsers behave’ was a daily prayer, and Resig’s little library answered it with a syntax so humane it felt like the future arriving early. It was.
The web we document (the standards-based, progressively enhanced web that no longer needs the library) was built substantially through it. By developers it taught. Patterns it proved. Expectations it set that the platform then had to meet.
Twelve years is a good run for any tool and an extraordinary one in this industry. The appropriate send-off is not the category’s snark but the engineer’s version of gratitude. We learned from it. We shipped decades of value with it. We will maintain what remains with respect, and we will retire it the way it deserves. Gradually, calmly, and without a single emergency.
The library that taught the web to script gets a graduation, not a funeral. We were there for the enrollment, and we are glad to write it.