jQuery 4.1.0 has been released, introducing a range of updates across core functionality, AJAX handling, and security improvements.

According to the release notes, the AJAX module gained a new responseURL field for jqXHR objects, allowing developers to access the final URL after any redirects. The release also adds support for an alternative completeCallback API for transports, expanding integration options.
Core improvements include refactoring loops to prevent array bounds violations and replacing deprecated getElementsByTagName and getElementsByClassName methods in favor of the more modern querySelectorAll API.
The selector module received multiple updates focused on performance and security. jQuery.uniqueSort duplicate removal has been optimized, and the library now implements stricter validation in quick selection paths. Notably, the release addresses a ReDoS (Regular Expression Denial of Service) vulnerability in identifier matching, a security concern that could potentially allow attackers to cause performance degradation through specially crafted inputs.
CSS handling improvements include better support for XML documents through the use of createElementNS, and fixes to the computeTableStyleTests probe table to prevent reuse issues.
The selector module also includes a workaround for a Safari 27 regex interpreter bug and improved handling of invalid escape code points, which are now decoded to U+FFFD.
Documentation updates note the addition of TuxCare as a commercial support vendor and various corrections to README files. The active version table has been updated, and new guidelines for machine-generated contributions have been added.
The test suite has been significantly expanded, with new coverage for AJAX binary data, jQuery.parseXML error reporting, animation callback signatures, and .data() behavior on SVG elements. Browser-specific test expectations have been updated, including adjustments for Chrome’s reliable table dimension handling and IE’s binary data support.
Key facts
- jQuery 4.1.0 adds responseURL field to AJAX jqXHR objects for tracking redirects
- Library replaces deprecated getElementsByTagName and getElementsByClassName with querySelectorAll
- Release includes fix for ReDoS vulnerability in selector identifier matching
- Performance optimization implemented for jQuery.uniqueSort duplicate removal
- Improved XML document support through createElementNS in CSS module
