| jQuery 4 Released |
| Written by Ian Elliot | |||
| Wednesday, 21 January 2026 | |||
|
Irrelevant? A dinosaur in an age of refinement? Neither of the above. It is still JavaScript's standard library and has been brought up-to-date and made entirely relevant with this long-anticipated new major version.
jQuery may have been overtaken by bigger abstractions such as Svelte, React, Angular and so on, but you really don't need a bigger abstraction. Even if you do, jQuery still has a lot to offer. One of the problems it faces is that more recent JavaScript programmers may not understand what jQuery is all about and this explains some of the negative feeling you hear expressed. There was an era when using jQuery was a required. It wasn't optional. Twenty years ago browsers set the standard, or should I say standards. IE (Internet Explorer) was probably the biggest problem with Microsoft thinking it could just innovate and the rest would follow its lead. What you needed jQuery for was to iron out the irregularities between browsers. If you wrote a program using jQuery you could be reasonably confident that it would run in the same sort of way on any browser and this simplified things to the point where its use was essential. Since then we have had HTML 5 and ECMAScript standards that have ironed out a lot of the differences between browsers. Given also that Chrome and its layout engine virtually rule the web, you really only have to check Firefox as an extra, even if you don't use jQuery. So why bother with jQuery 4? It has been ten years since jQuery 3 and over the time it had become clear that there was no real need for many of the features that it supports. Much of the work in creating jQuery 4 has been working out what can be safely left out. Earlier versions of jQuery provided a solid and easy-to-use way of doing Ajax, but who remembers Ajax today? But we still download things into live HTML pages and this is the same technology. Apart from backward compatibility we don't really need jQuery's extensive support for Ajax. In the same way we don't need its support for browsers before IE 11, JSON, many of its string handling methods and so on. On the other hand there is still support for Deferred, jQuery's version of a promise and so on. As the announcement says: "Many of the breaking changes are ones the team has wanted to make for years, but couldn’t in a patch or minor release. 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." Perhaps the biggest change is the dropping of Sizzle, its selection engine. Once this was essential but browsers have got better at selection and so jQuery can now delegate to the browser. The downside is that you can no longer use a set of custom selectors, but selector methods are still supported and do the job better. While new features like support for trusted types and a move to ES modules are welcome, mostly the new version is about modernisation and throwing out the superseded.
Some of the jQuery team at the launch - that's John Resig (jQuery's creator) Zooming in on the monitor. It is often said that you don't need jQuery because you can do everything you need just using JavaScript and DOM functions. This is true, but it misses the important point that it's not about being able to do something, it's about being able to do it well and efficiently. It is worth reminding ourselves of jQuery's motto: write less, do more. You can't know what this means unless you have actually programmed using jQuery enough to "get it". Encountering jQuery back in the early days of JavaScript was an eye opener on how to write code using JavaScript. Since then most efforts have been to reduce JavaScript back to a plain, class-based, object-oriented language - TypeScript, for example. JavaScript has its own unique set of properties that makes its the approach of using terse function chaining the obvious way to do things. It's not a functional programming language, but its style is a sort of relaxed functional programming where function call chains pack a lot of processing in a neat coherent bundle. This is how jQuery works and its pure JavaScript. If you think you know JavaScript, give jQuery 4 a try. Use it and then understand how it works. Your code will be so much better for it.
More InformationRelated ArticlesjQuery 3.6.2 Updates Handling Of Chrome Selectors Starting To Oust Sizzle From jQuery jQuery Still Our Favourite Framework jQuery 3.2.1 Is Out - Do We Still Care? jQuery Adopts Semantic Versioning To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Facebook or Linkedin.
Comments
or email your comment to: comments@i-programmer.info
|
|||
| Last Updated ( Wednesday, 21 January 2026 ) |




