We weren’t here to report it in real-time, but on February 6, jQuery Core Team Lead Timmy Willison announced that jQuery 4.0.0 is now available in beta.
jQuery 4.0.0 has been in the works for a long time, but it is now ready for a beta release! There’s a lot to cover, and the team is excited to see it released. We’ve got bug fixes, performance improvements, and some breaking changes.
We’ve trimmed legacy code, removed some previously-deprecated APIs, removed some internal-only parameters to public functions that were never documented, and dropped support for some “magic” behaviors that were overly complicated.
The post includes an overview of the changes, starting with the highlight: dropping support for IE10 and older. The team planned to part with IE11 after Microsoft ended support in 2022 but eventually decided to push this change to v5 to avoid any more blockers to the v4 release.
The upcoming release uses ES modules and switches from RequireJS to Rollup for packaging. It also removes 13 deprecated functions that “were either always meant to be internal or ones that now have native equivalents in all supported browsers.”
78 Million Websites Use jQuery
Adherence to modern browser behavior and specs is a common thread in the announcement post. Indeed, browsers have come a long way since January 2006, when jQuery was launched, Internet Explorer had a 90% market share, and front-end development was a constant struggle.
Today, with 99.84% browser support for ES6, a slew of well-supported Web APIs, and robust upgrades to CSS—when we can run a full-blown WordPress instance in the browser using WebAssembly—do we still need a 1.25 MB DOM manipulation library?
Or, in the words of an opinionated Redditor:
Look, jQuery was incredible and it changed JS in incredible ways. It made the JS developer experience incredible because it was so inventive. And the JS community and TC39 implemented so many things that jQ did incredible. It was one of the goals of jQ – set standards and improve the JS language. And it worked. And it’s no longer needed.
Judging by online statistics, the answer is an unequivocal “YES!”. jQuery might be the uncool kid in the front-end neighborhood, but its market share dwarfs the hipper frameworks.
Based on NPM, jQuery 3.7.1, released in August 2023, boasts over 9 million weekly downloads and has more than 20k dependent packages.
BuiltWith indicates that over 78 million websites use jQuery, while W3Techs reports that “jQuery is used by 94.4% of all the websites whose JavaScript library we know. This is 77.1% of all websites.”
A Legacy Dependency
Among the chief reasons for jQuery’s relentless popularity is being instrumental to the ecosystem. Namely, it’s bundled in WordPress Core and is part of numerous themes and plugins.
WordPress’ adoption of React-based Gutenberg has lowered its dependency on jQuery. During a Developer Hours session hosted a week after Willison’s announcement, titled JavaScript for modern WordPress development, Automattic’s developer advocates Ryan Welcher and Nick Diego spent more than an hour diving into JS tools and techniques to build blocks and editor extensions; they didn’t once mention jQuery.
In a post published in October 2021 on the Make Themes blog, core contributor Felix Arntz urged theme developers to move away from jQuery to improve performance.
Still, a TRAC ticket opened on the day of Willison’s announcement reported the news and enquired, “Is this something that wp core will be looking to implement?”. Andrew Ozz, Lead Developer at Automattic, replied, “Of course :)”
With a 43% share of the CMS market, WordPress could be the serum of jQuery’s longevity.
“>en.wikipedia.org/wiki/JQuery#/media/File:JQuery_logo.svg</p> ” data-image-caption data-medium-file=”https://wptavern.com/wp-content/uploads/2024/02/jQuery-logo.png?w=300″ data-large-file=”https://wptavern.com/wp-content/uploads/2024/02/jQuery-logo.png?w=500″ loading=”lazy” width=”500″ height=”122″ src=”https://wptavern.com/wp-content/uploads/2024/02/jQuery-logo-500×122.png” alt=”jQuery’s logo and tagline: write less, do more” class=”wp-image-154072″ style=”border: none; -ms-interpolation-mode: bicubic; max-width: 100%; margin-bottom: 24px; margin: 0;”>
The last time WP Tavern covered jQuery was in 2020, when jQuery Migrate 1.4.1 was removed from WordPress 5.5, causing themes and plugins to fail.
The WordPress Core team’s Enable jQuery Migrate Helper plugin—launched to tackle these problems—is still maintained and has 100k active installs. It also has some glaring reviews about how helpful it is. Why would people building WordPress websites in 2024 need to use a plugin designed “as a temporary solution, enabling the migration script for your site to give your plugin and theme authors some more time to update, and test, their code.”?
A Trailblazer that Moves the Web Forward
Perhaps the answer lies in an alarming comment found on W3Techs. A third of the websites that use jQuery run a version older than 3.x (3.0.0 was released in June 2016).
These results correlate with a smaller-scoped study conducted by the OpenJS Foundation and IDC in November 2023. Out of 509 survey respondents, 89% confirmed they use jQuery, with 56% deploying older versions, some no longer maintained.
Open-source and standardization expert Tobie Langel, speaking at the W3C’s Secure the Web Forward workshop, believes “jQuery’s massive reach and longevity” puts it in a unique position: if securing jQuery means securing the web, then “Once again–and against all odds–jQuery can be a trailblazer and help move the web forward.”
There’s already an ongoing effort: In October 2022, the Open Source Security Foundation (OpenSSF) Project Alpha-Omega awarded jQuery a $350k grant to “reduce potential security incidents for jQuery by helping modernize its consumers and its code.”
Backed by industry giants like the Linux Foundation, Microsoft, Google, and Amazon, and part of the OpenJS Foundation supported by GoDaddy, IBM, Joyent, and the Sovereign Tech Fund, jQuery seems like it will get to live to see more than just another day.
How about you? When was the last time you started a script with $(function()?