After 10 years, jQuery 4.0 is here. Here's what changed, what broke, and what you need to know before upgrading—from someone who's been using jQuery since the early days.
Twenty years after John Resig introduced jQuery at BarCamp NYC, the team finally shipped jQuery 4.0.0. It's been almost a decade since the last major version, and honestly? The changes are mostly good news.
If you're still using jQuery in 2026, you probably have legacy code that works. The question isn't whether jQuery 4.0 is better—it is. The question is whether upgrading will break things.
Spoiler: probably not much. But there are some breaking changes worth understanding.
jQuery 4.0 isn't a rewrite. It's a cleanup release. The team removed legacy code, dropped dead browser support, and modernized the build system. The result? A smaller, faster library that works better with modern tooling.
Most of your existing code will work. The breaking changes are mostly edge cases and deprecated APIs that should have been removed years ago.
jQuery 4.0 drops support for IE 10 and older. IE 11 support remains for now, but the team plans to remove it in jQuery 5.0.
Why it matters:
When it doesn't:
The team also dropped support for Edge Legacy, very old iOS/Firefox/Android versions. If you're targeting modern browsers, this is pure upside.
jQuery 4.0 adds proper Trusted Types support, which matters if you're using Content Security Policy with require-trusted-types-for.
Why it matters:
The technical change:
Most async script requests now use <script> tags instead of XHR to avoid CSP errors. There are still a few XHR cases (like when using "headers" option), but the default behavior is CSP-friendly.
If you're not using CSP, you won't notice this. If you are, it's a welcome fix.
The jQuery source code migrated from AMD to ES modules. This is a build-system change, but it has real implications.
Why it matters:
<script type="module"> in browsersWhat changed:
jQuery switched from RequireJS to Rollup for packaging. The source is now published as ES modules on npm, making it compatible with modern JavaScript workflows.
If you're using a bundler, this is good news. If you're loading jQuery via CDN, nothing changes.
Several jQuery utility functions have been removed. These were deprecated for years and now have native browser equivalents.
Removed functions:
jQuery.isArray → use Array.isArray()jQuery.parseJSON → use JSON.parse()jQuery.trim → use String.prototype.trim()jQuery.type, jQuery.now, jQuery.isNumeric, jQuery.isFunction, jQuery.isWindow, jQuery.camelCase, jQuery.nodeName, jQuery.cssNumber, jQuery.cssProps, jQuery.fx.intervalWhy it matters:
The reality:
If you're using these, you'll need to update your code. But honestly? You should have migrated years ago. Native equivalents are faster and don't require jQuery.
The jQuery prototype had some Array methods (push, sort, splice) that were never meant for public use. They're gone now.
Why it matters:
If you were using them:
Replace $elems.push(elem) with [].push.call($elems, elem). But if you were using these, you were probably doing something unusual anyway.
This is a subtle but important change. Browsers finally agreed on focus event order, and jQuery 4.0 follows the W3C specification instead of jQuery's old custom order.
The new order (W3C spec):
jQuery's old order:
focusout, blur, focusin, focus
Why it matters:
The catch:
If you have code that depends on jQuery's old event order, it will break. But this is rare—most code doesn't rely on specific event ordering.
The slim build got smaller by removing Deferreds and Callbacks (now around 19.5KB gzipped).
Why it matters:
When to use slim:
If you're not using $.Deferred() or $.Callbacks(), the slim build is perfect. If you need IE11 support, use the main build or add a Promise polyfill.
Most modern code can use native Promises anyway, so this is a good trade-off.
The jQuery team says most users can upgrade with minimal changes. That's probably true, but here's what to watch for:
Definitely breaking:
jQuery.isArray, etc.)Probably fine:
The upgrade path:
jQuery Migrate plugin is available to help identify issues. Use it during testing, then remove it once everything works.
Upgrade if:
Stay on 3.x if:
For most projects, upgrading makes sense. The bundle size reduction alone is worth it, and the modern tooling support helps if you're using bundlers.
jQuery 4.0 is what jQuery should have been years ago. It's smaller, faster, and works better with modern JavaScript tooling. The breaking changes are mostly cleanup—removing APIs that should have been deprecated long ago.
The library isn't dead. It's just finally modern.
If you're still using jQuery in 2026, you probably have a good reason. Legacy codebases, WordPress plugins, or projects where jQuery is deeply embedded. jQuery 4.0 makes those projects better without forcing a complete rewrite.
That's the real win here.
No comments yet
Loading comments...