jQuery 4.1.0 is out, and so is jQuery 3.8.0. Timmy Willison announced both in a post on the jQuery blog on 17 November. He calls 4.1.0 the first minor release of the 4.x line. 3.8.0 is a different kind of release. It ships fixes that have waited on the 3.x-stable branch for years, and Willison’s own label for it is “a send-off, not a comeback.”
After this, 3.x gets only critical security and bug fixes. The post tells anyone still on 3.x to use the 4.0 upgrade guide and the jQuery Migrate plugin, and says most people can upgrade with minimal changes. 4.0.0 shipped in January.

Changes in both releases
Three changes are in both. Custom AJAX transports used to get a completeCallback with positional arguments. They can now call it with one object instead. That lets jQuery add parameters later without anyone depending on their order, and lets a transport pass only what it has. 4.1.0 already uses it for a new field.
// Before: positional arguments
function( status, statusText, responses, headers ) {}
// Now also accepted: one object
function( { status, statusText, responses, headers } ) {}
Both releases also close a ReDoS hole in the selector engine. The expression that matches identifiers could backtrack forever on a long chain of hex escapes followed by an invalid character, in an attribute selector for instance, and that hung the page. It now excludes digits and hex characters where the spec says to. The third shared change replaces the last strict document comparisons in the selector code with loose ones, since IE and Edge Legacy sometimes throw on the strict form. A workaround for a Safari 27 regex interpreter bug is on both branches too, per the changelog.
Only in 4.1.0
jqXHR objects gain responseURL, the final URL after any redirects. It’s set only when the transport can report it. Browser XHR can. IE 11 and the script and JSONP transports can’t.
The .serialize() and .serializeArray() methods now handle form-associated custom elements, meaning custom elements registered with formAssociated set to true. jQuery used to drop them on a tag name check. Anything listed in form.elements is now trusted to be submittable.
XML documents that aren’t XHTML, like XSLT output, put elements made by document.createElement in the XML namespace, where they have no style property. That broke jQuery’s CSS support tests. jQuery now uses createElementNS with the XHTML namespace, so .css() works there.
jQuery has also dropped getElementsByTagName and getElementsByClassName internally in favour of querySelectorAll. The post says querySelectorAll is as fast as the old methods or faster in current browsers and returns a static list, so there’s no live collection to snapshot. It fixes some old bugs as well: MathML elements missed by lowercase tag name on cloned nodes in IE 11, selectors that start with a combinator failing on document fragments, and tag names containing dots. Invalid escapes in selectors now decode to U+FFFD, as CSS requires.

uniqueSort removes duplicates in a single pass with two pointers instead of repeated splices. Time drops from O(N²) to O(N), and extra space from O(N) to constant. Results and ordering don’t change.

Only in 3.8.0
Setting hidden to until-found through .attr() now works in 3.x. Boolean attribute normalisation used to overwrite it. 4.x already handles boolean attributes differently, so it needed no fix.
3.8.0 also deprecates APIs that 4.0.0 removed, so Migrate can warn you before you upgrade. Those are the push, sort and splice methods on the jQuery prototype, and jQuery.expr[ ":" ] with jQuery.expr.filters, which the docs have called deprecated since 3.0.0. The replacement for the latter is jQuery.expr.pseudos. Backports from 4.0.0 fill out the release: self-removing scripts passed to .html(), jQuery.cleanData skipping elements, table col dimensions, leverageNative event handling and CSS zoom test fixes.
// Deprecated in 3.8.0, removed in 4.0.0
$elems.push( elem );
// Replacement
[].push.call( $elems, elem );
Getting them
Both are on npm and the jQuery CDN, with slim builds for each.
npm install [email protected]
npm install [email protected]
The post says other CDNs will probably have them soon, but jQuery doesn’t control their schedules. Willison’s post names 3.8.0 as the last planned feature release on the 3.x branch and says active development is on 4.x.
Discover more from Sulat AI & Tech News
Subscribe to get the latest posts sent to your email.




