Gołębiowski-Owczarek was the co-author of two articles on the OpenJS Foundation’s blog earlier this month, which addressed ongoing “modernization efforts” in the jQuery project. The first post announced a new version of jQuery UI — a user interface library built on top of the core jQuery library. It will be “the project’s final planned release,” meaning that jQuery UI is now “in maintenance-only mode.” The second post announced the deprecation of jQuery Mobile, another sub-project of jQuery that provided an “HTML5-based user interface system” for mobile browsers.
Both of these projects have been winding down since 2018, when they were made “Emeritus projects” of the OpenJS Foundation. Neither of the announcements, though, affects the so-called jQuery Core project, which continues to be an “Impact project” of the OpenJS Foundation. In other words, the main jQuery project isn’t going away any time soon.
The WordPress Factor
“A lot of the surprise about jQuery usage stats comes from living in a bubble,” Gołębiowski-Owczarek told me. “Most websites are not complex Web apps needing a sophisticated framework, [they are] mostly static sites with some dynamic behaviors — often written using WordPress. jQuery is still very popular there; it works and it’s simple, so people don’t feel the need to stop using it.”
jQuery will continue to be a part of WordPress for some time to come, if for no other reason that it would be difficult to remove it without breaking backward compatibility. But I asked Gołębiowski-Owczarek if WordPress is likely to eventually move away from its reliance on jQuery?
“I think it’s partially already happening,” he replied. “The Gutenberg editor that WordPress created doesn’t depend on jQuery. So at least on the admin side, they have variations that are not dependent on it.”
He expects that over time WordPress will move onto newer technologies, but that it will be a gradual process.
Among the WordPress developer community, the “performance impact of using jQuery in WordPress themes” is a hot topic. There’s even a reference website called “You might not need jQuery” that offers tips on how to replace jQuery in your WordPress application. Its reasoning includes the fact that with modern browsers, “you might not need anything more than what the browser ships with.”
However, there’s another document that warns that “developers should be aware that ditching libraries, like jQuery, can easily require large amounts of research on their end to avoid bugs (even in modern browsers).” So despite the fact that “Is jQuery dead?” articles have been circulating for several years, it’s very much still alive in the WordPress ecosystem at least. Developers are being encouraged to replace it, but at their own risk.
jQuery’s Role Then…
So how did jQuery come to be so embedded in today’s web? A little history is needed to answer that.
So basically, jQuery had been invented to help developers deal with the browser inadequacies of the time.
…jQuery’s Role Now
“Those frameworks provide abstractions for easier synchronization between the data and the view,” said Gołębiowski-Owczarek about the likes of Next.js and Angular. “So their users no longer need to modify/access the DOM directly so often, and are often discouraged from doing that. In such an environment, using jQuery doesn’t make much sense. But that’s just a small part of the whole web ecosystem.”
However, Gołębiowski-Owczarek acknowledged that jQuery may have performance issues for large-scale applications.
“We’ve improved jQuery performance a lot over the years,” he said, “but there are some obstacles that are hard to deal with. One of them is that to not conflict with the browser, jQuery doesn’t modify native prototypes — as some of the other libraries did (often later causing issues with standardization of conflicting APIs) — but it instead wraps DOM nodes with jQuery wrapper objects. Each operation on such a wrapper creates a new one. In most cases, it doesn’t matter, but for very complex applications with lots of DOM manipulation this can sometimes become an issue.”
In any case, jQuery will be embedded in tens of millions of WordPress sites for years to come. It may even outlast React.