Technology

jQuery 4.1.0 Ships, and the 3.x Line Moves to Critical Fixes Only

Martin HollowayPublished 4m ago4 min readBased on 2 sources
Reading level
jQuery 4.1.0 Ships, and the 3.x Line Moves to Critical Fixes Only
source:jquery.com

jQuery 4.1.0 is published and marked Latest on the project's GitHub releases page. Timmy Willison (timmywil) released it on 17 November at 18:59. jQuery 3.8.0 shipped alongside it, and according to the project blog, both versions are available through the jQuery CDN and the npm package manager.

The 4.1.0 release notes start with the jqXHR object, the wrapper jQuery returns for an AJAX request. It now carries a responseURL field (#4339). The field is populated only when the transport can report the URL. Modern-browser XHR (XMLHttpRequest) provides it. IE 11, script transports and JSONP transports do not, so code that reads responseURL on those paths will find nothing.

The release also drops the getElementsByTag/ClassName helpers in favor of querySelectorAll (#3642), the browser's native CSS-selector lookup. Selector code has been reworked as well. According to the blog, strict document comparisons were converted to loose comparisons to avoid crashes in IE and Edge Legacy. The same release fixes a ReDoS issue in identifier matching, a regular-expression denial-of-service pattern in which crafted input forces catastrophic backtracking, where the regex engine retries an enormous number of paths.

Form serialization gets two changes. Serialize now supports form-associated custom elements (#5245). Elements that appear in form.elements are treated as submittable rather than being filtered out by a tag name check, so custom controls that take part in form association can be picked up without a special case.

CSS methods now work in XML documents. The blog says jQuery creates elements internally with createElementNS and the XHTML namespace, so methods such as css no longer depend on an HTML document context.

For custom AJAX transports, 4.1.0 adds an option that lets the complete callback receive a single object containing status, statusText, responses and headers, in place of positional arguments. The change is additive as described. Transport authors who want the object form can opt in.

The 3.x line is where the maintenance picture changes. The blog states that the 3.x branch will receive only critical security and bug fixes from here on. Projects pinned to 3.x will continue to get fixes in those categories, but feature work will land on 4.x.

In my view, the practical question for most teams is not whether 4.1.0 installs cleanly but where their dependency on 3.x sits on the roadmap. A codebase that still uses jQuery for DOM traversal, AJAX or form handling has to decide whether to move to 4.x now or keep 3.8.0 on a narrower support track. The jqXHR and transport changes are the parts most likely to touch existing plugins, and those are worth auditing before an upgrade rather than after.

The broader context here is a library that still sits inside a large number of production front ends. The 4.1.0 changes move the code toward native DOM APIs such as querySelectorAll while keeping older browser paths alive in the selector code, and they extend serialization to custom form-associated elements. Whether that balance suits a given codebase depends on which browsers and transports it still serves. Each team can answer that from its own traffic and test matrix.