News 4 min read

jQuery 4.1.0 and 3.8.0 released, last planned 3.x feature release


The jQuery team released jQuery 4.1.0 and jQuery 3.8.0 on November 17, 2026. 4.1.0 is the first minor release of the 4.x line, and 3.8.0 is the last planned feature release of 3.x: from now on the 3.x branch gets only critical security and bug fixes. If your site or plugin still runs on jQuery 3, both releases fix a selector bug that could hang a page, and the team is telling you it is time to move to 4.x.

What’s new

In both 4.1.0 and 3.8.0:

  • Selector ReDoS fix. The regular expression jQuery uses to match identifiers in selectors could backtrack catastrophically. 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 CSS spec says it should.
  • A new callback shape for custom AJAX transports. Transports used to call completeCallback( status, statusText, responses, headers ) with positional arguments. They can now pass a single object, { status, statusText, responses, headers }, so jQuery can add fields later without depending on argument order.
  • Fewer crashes in IE and Edge Legacy. The last strict === document comparisons in the selector code, which those browsers sometimes throw on, are now loose comparisons.

Only in 4.1.0:

  • jqXHR.responseURL. The jqXHR object now exposes the final URL of a request after the browser followed any redirects. Like responseText and responseJSON, it is only set when the transport can report it: modern browser XHR does, IE 11 and the script and JSONP transports don’t.
  • Form-associated custom elements serialize. Custom elements registered with formAssociated = true now show up in .serialize() and .serializeArray(). Elements in form.elements are trusted as submittable instead of being filtered by tag name.
  • querySelectorAll everywhere. jQuery no longer uses getElementsByTagName or getElementsByClassName internally. The team says querySelectorAll is as fast or faster in today’s browsers, and the switch fixes older bugs, such as selectors with leading combinators on document fragments and tag names containing dots. Invalid escape sequences in selectors now decode to U+FFFD, as the CSS spec requires.
  • CSS methods in XML documents. In non-XHTML XML documents, such as XSLT output, .css() now works because jQuery creates its test elements in the XHTML namespace.
  • Faster jQuery.uniqueSort. Duplicate removal is now a single pass, going from O(N²) time to O(N) with constant extra space. The order of results is unchanged.

Only in 3.8.0:

  • .attr( "hidden", "until-found" ) now keeps the until-found value instead of treating hidden as a plain boolean attribute.
  • Two sets of APIs that jQuery 4.0.0 removed are now formally deprecated in 3.x, so the jQuery Migrate plugin can warn about them: the push, sort and splice array methods on the jQuery prototype, and jQuery.expr[ ":" ] and jQuery.expr.filters (use jQuery.expr.pseudos).
  • Fixes that already shipped in 4.0.0 are backported, including self-removing scripts passed to .html(), jQuery.cleanData skipping elements, and dimensions for table <col> elements.

What it means for developers

Both versions are on npm and the jQuery CDN now. From the release post:

npm install [email protected]
npm install [email protected]

Or load it from the CDN: https://code.jquery.com/jquery-4.1.0.min.js (slim builds are at jquery-4.1.0.slim.min.js). The team notes that other third-party CDNs set their own schedules and may take some time to pick up the new files.

If you are already on 4.0, 4.1.0 is a minor release with fixes and small additions; the behaviour changes to watch for are in selectors, where invalid escapes now decode to U+FFFD and the quick paths for simple tag and class selectors are stricter (with a fallback to normal selection when querySelectorAll throws).

If you are on 3.x, the practical path is: update to 3.8.0 to get the ReDoS fix, run the jQuery Migrate plugin to see warnings for APIs that 4.x removed (now including the prototype push/sort/splice and jQuery.expr.filters), then follow the jQuery 4.0 upgrade guide. The team says most users can upgrade “with minimal changes”. If code calls $elems.push( elem ), the release post suggests [].push.call( $elems, elem ) instead.

Custom AJAX transport authors can switch to the object form of completeCallback now on either branch. In 4.1.0 that is how responseURL reaches jqXHR, so a transport that wants to report it has to use the new shape.

Plenty of older code, including small UI snippets like our sticky navigation bar with jQuery, still runs on jQuery 3; with 3.x now in fixes-only mode, that is the kind of code to test against 4.1.0.

Sources