jQuery 4.1.0
jQuery 4.1.0 was published on November 17, 2026. It is the first minor release on the 4.x line and the first significant step for the project after the 4.0.0 cleanup cycle. The same day, the team also published jQuery 3.8.0, described in the release announcement as a send-off for the 3.x branch rather than a comeback. From this point, 3.x receives critical security and bug fixes only.
The release is available on the jQuery CDN and through npm. Third-party CDNs will pick it up on their own schedules.
Overview
Version 4.1.0 is a maintenance-oriented minor, not a feature release. The changes fall into four groups: two fixes shared with the 3.8.0 branch, Ajax API expansion, stricter and faster selector internals, and small corrections to form serialization and CSS handling in XML documents.
Changes Shared With 3.8.0
- ReDoS fix in identifier matching. The regular expression used to match identifiers in selectors was vulnerable to catastrophic backtracking. A long chain of hex escapes followed by an invalid character, for example inside an attribute selector, could hang the page. The pattern now excludes digits and hex characters where the specification says it should, which removes the ReDoS path and brings matching closer to spec.
- Object-style complete callbacks for Ajax transports. Custom transports have always received a positional callback:
function( status, statusText, responses, headers ). They can now invoke it with a single object instead:function( { status, statusText, responses, headers } ). Positional arguments still work. The object form lets jQuery add parameters later without depending on argument order, and lets a transport report only what it has. - Loose document comparisons. Residual strict comparisons left in selector code, which sometimes threw in IE and Edge Legacy, have all been converted.
New in 4.1.0: Ajax and Forms
jqXHR.responseURL exposes the final URL of a request after redirects, following the existing responseText, responseXML, and responseJSON pattern. It is only populated when the transport can report it: modern browser XHR does, while IE 11 and the script and JSONP transports do not. This value is what the new object-form complete callback was built to carry.
Form-associated custom elements now serialize. Elements registered with formAssociated = true are included by .serialize() and .serializeArray(). Rather than filtering by tag name, jQuery now trusts elements that appear in form.elements as submittable, which is the correct check for custom controls that participate in form submission.
Selector and Core Internals
querySelectorAll replaces the legacy traversal helpers. Internally, jQuery no longer calls getElementsByTagName or getElementsByClassName. In current browsers querySelectorAll is comparable or faster, and it returns a static list instead of a live collection that had to be snapshotted. The switch also fixes older bugs: MathML elements not matching lowercase tag names on cloned nodes in IE 11, selectors with leading combinators failing on document fragments, and tag names containing uncommon symbols such as dots.
Quick selection paths are stricter. The fast paths now check more carefully whether a selector really is a simple tag or class selector, and fall back to full selection if querySelectorAll throws. Invalid escape sequences in selectors decode to U+FFFD, the replacement character, as the CSS specification requires.
jQuery.uniqueSort is O(N). Duplicate removal now uses single-pass two-pointer compaction instead of repeated splices, dropping the cost from O(N²) time with O(N) extra space to O(N) time with constant space. Ordering and behavior are unchanged, so this is a free win on large detached node sets.
CSS Fixes
In non-XHTML XML documents, such as pages produced by an XSLT transform, elements created with document.createElement land in the XML namespace and have no style property. That broke jQuery's CSS support probes. jQuery now creates its internal test elements with createElementNS in the XHTML namespace, so .css() and related methods behave normally in those documents.
A separate fix empties the table used by the computed-style probe when the probe table may be reused, preventing stale measurements from leaking between calls.
Notes for 3.x Users
The 3.8.0 branch carries most of the same fixes plus two things specific to it. Support for hidden="until-found" is corrected, since the boolean-attribute normalization in 3.x clobbered the new value while 4.x already handles it. Two API groups removed in 4.0.0 are formally deprecated in 3.x so jQuery Migrate can warn about them: the push, sort, and splice array methods on the jQuery prototype, which were never intended for public use, and the jQuery.trim style helpers that 4.0.0 dropped.
Upgrading
- Update the npm dependency or CDN reference to
[email protected]. - If you maintain a custom Ajax transport, keep the positional callback signature unless you also need
responseURL. If you switch to the object form, guard for older jQuery versions in any code path shared with 3.x. - Run the jQuery Migrate plugin once if you are arriving from 3.x. It flags the removed prototype array methods and the deprecated helpers.
- No breaking removals are listed for 4.1.0, so test failures after the upgrade are more likely to come from the stricter selector quick paths than from API changes.
The 4.1.0 release is a quiet one, but the ReDoS fix alone justifies moving. Projects that parse user-influenced selector strings, such as admin tools that accept CSS paths from input, have a concrete reason to upgrade rather than defer.