Twenty years after its debut, jQuery 4.0 arrives with modernized architecture, dropped legacy browsers, ES modules support, and streamlined APIs.
jQuery 4.0.0: Modernizing the Legacy
Twenty years after John Resig introduced jQuery at BarCamp NYC, the team releases jQuery 4.0. This major version eliminates legacy code, embraces modern web standards, and streamlines development workflows. After extensive testing through pre-releases, this update focuses on sustainability for the next decade.
Breaking Changes and Migration
- Browser Support: IE10 and older versions are no longer supported. Legacy Edge, outdated iOS (below last 3 versions), and Firefox releases (excluding ESR) were also removed. Projects needing these should remain on jQuery 3.x.
- Deprecated APIs Removed: Long-deprecated methods like
jQuery.isArray,jQuery.parseJSON, andjQuery.trimwere eliminated in favor of native JavaScript equivalents (Array.isArray(),JSON.parse()). - Focus Event Order: Aligned with the W3C specification, changing from
(focusout → blur → focusin → focus)to(blur → focusout → focus → focusin).
Core Improvements
- ES Modules: The source now uses modern ES modules, replacing AMD. Compatible with Rollup and native
<script type="module">. - Trusted Types: Added support for TrustedHTML to comply with strict Content Security Policies.
- Size Reduction: Removal of legacy code shrinks the library by over 3KB gzipped.
Slim Build Enhancements
The slim variant excludes Deferreds/Callbacks (now ~19.5KB gzipped). Native Promises replace these in all supported browsers except IE11. For IE11 compatibility, use the full build or a Promise polyfill.
Upgrade Path
- Review the upgrade guide
- Use the jQuery Migrate plugin
- Test thoroughly before deployment
Download Links
- Full version: jquery-4.0.0.js | Minified
- Slim build: jquery-4.0.0.slim.js | Minified
Install via npm:
npm install [email protected]
Celebrating 20 Years

This release coincides with jQuery's 20th anniversary. Contributors worldwide gathered in Dallas for a reunion, joined remotely by John Resig. Special thanks to Alex, Richard Gibson, Michał Gołębiowski-Owczarek, and over 30 other contributors listed in the full changelog.
Next Steps: Upgrade projects, report issues through GitHub Issues, and join the conversation on the jQuery forum.

Comments
Please log in or register to join the discussion