jQuery 4.0: What the First Major Release in a Decade Really Changes

Última actualización: 01/22/2026
  • jQuery 4.0 is the first major release in about 10 years, launched around the library’s 20th anniversary, and focuses on modernization rather than flashy new features.
  • The update drops support for IE10 and several legacy browsers, aligns focus events with W3C specs, and significantly trims old, deprecated APIs.
  • jQuery’s source has moved from AMD to ES modules with Rollup, improves CSP compliance with Trusted Types, and further shrinks the standard and slim builds.
  • Despite modern JavaScript and popular frameworks, jQuery remains widely used, with opinions split between those seeing it as legacy and those who still value its concise API.

jQuery 4 illustration

After almost a decade without a major update, jQuery 4.0 marks a new chapter for one of the most influential JavaScript libraries on the web. Timed to land just after the 20th anniversary of John Resig unveiling jQuery, this release isn’t so much about flashy new tricks as it is about stripping out legacy baggage and aligning the project with how we actually build for browsers today.

Rather than reinventing itself, jQuery 4 aims to stay relevant by modernizing its core: dropping support for outdated browsers, embracing ES modules, improving security through Trusted Types, and cleaning up long‑deprecated APIs. The result is a leaner library that fits more naturally into current tooling, while still trying not to “break the web” for the huge number of sites that rely on it.

A major release a decade in the making

The jump to 4.0 is the first big version bump since the jQuery 3 series, arriving after a long development cycle with betas and pre‑releases starting in early 2024. The team has described it as the release where they finally implemented changes they had wanted for years but couldn’t ship in patch or minor updates.

Behind the version number is a broader milestone: jQuery has now been around for roughly twenty years. When John Resig first introduced the library in 2006, working with the DOM across browsers like IE, Firefox and Safari was error‑prone and tedious. jQuery quickly became the de facto way to smooth over those inconsistencies, making selectors such as $("#myspan") feel far more approachable than verbose native alternatives.

That early success shaped the web. According to long‑running technology surveys, jQuery is still present on a large majority of sites that declare a JavaScript library, even as newer frameworks like React, Vue, Angular or Svelte have taken center stage in many greenfield projects.

With such widespread adoption, the maintainers have repeatedly stressed that they can’t risk casually breaking existing pages, especially because many sites load jQuery straight from public CDNs. jQuery 4 therefore walks a fine line: it introduces breaking changes, but is designed so that most projects can upgrade with limited modifications, helped by an official upgrade guide and a refreshed jQuery Migrate plugin.

End of the road for IE10 and other legacy browsers

One of the most visible decisions in this release is that Internet Explorer 10 and older are no longer supported. This move has been anticipated for years, but jQuery 4 is the version that finally cuts the cord, reflecting how little usage these browsers see in modern analytics and encouraging teams to detect browser usage.

The deprecation story is phased: IE 11 still works with jQuery 4, but the team has already indicated that it will be dropped in jQuery 5. That gives organizations with strict legacy constraints some breathing room, while making it clear that the IE era is coming to an end.

Around IE, there are further cuts: Edge Legacy (pre‑Chromium) disappears from the support matrix, along with the old Android Browser and older generations of iOS and Firefox. Only the last few versions of these browsers, plus Firefox ESR, are kept in scope. Projects that truly must support such environments are expected to stay on the 3.x line.

Trimming this browser list not only simplifies testing across browsers; it also removes substantial chunks of compatibility code. That contributes directly to the smaller file size of jQuery 4, especially once the Internet Explorer specific branches are gone.

Security: Trusted Types and stricter CSP alignment

Beyond browser support, jQuery 4 also responds to modern security expectations in large production deployments. Many organizations now rely heavily on Content Security Policy (CSP) to reduce exposure to cross‑site scripting (XSS) attacks, and jQuery’s internals needed updates to behave cleanly under stricter rules.

The headline change is support for Trusted Types. When a site enforces policies such as require-trusted-types-for 'script', only values wrapped in specific Trusted Types (like TrustedHTML) may be injected into sensitive DOM sinks. Earlier jQuery versions could inadvertently violate these restrictions in some API paths, creating friction for teams trying to tighten their CSP.

With 4.0, HTML content wrapped as TrustedHTML can now be passed into jQuery’s DOM manipulation methods without triggering policy violations. The library has been audited so that, where possible, it works with Trusted Types instead of fighting them.

Another related tweak affects asynchronous script loading. jQuery now prefers creating standard <script> tags for many async script requests rather than relying on inline constructions. This shift helps avoid CSP errors in setups that forbid inline JavaScript, which is increasingly common in hardened deployments.

From AMD to ES modules and a new build pipeline

Under the hood, jQuery 4 embraces ES modules as its primary module format, leaving behind the older AMD structure that long powered its build chain. This aligns the project with the standard module system that modern JavaScript relies on.

Instead of RequireJS, the project now uses Rollup to bundle the ES module source. For teams integrating jQuery into contemporary toolchains, this means the library fits more naturally alongside other ESM‑based dependencies and can be consumed directly via <script type="module"> where appropriate.

Tests have also been adapted: the module‑based version is exercised on its own, so that issues specific to the ESM build can be caught early. This is particularly relevant for developers who want to import only parts of jQuery in custom bundles, or who are standardizing their codebase around ESM semantics.

Distribution hasn’t changed dramatically from an operational perspective. The new version is available through the official jQuery CDN and via npm, with third‑party CDNs typically picking it up over time. For existing CI pipelines or deployment processes, that means minimal friction when switching from a previous 3.x release to the new builds.

A long list of removed and deprecated APIs

Where earlier minor releases gently nudged developers away from old patterns, jQuery 4 finally removes many APIs that had been marked as deprecated for years. The goal is to lean on built‑in JavaScript features that every supported browser already provides.

Among the removals are utilities such as jQuery.isArray, jQuery.parseJSON, jQuery.trim, jQuery.type, jQuery.now, jQuery.isNumeric, jQuery.isFunction, jQuery.isWindow, jQuery.camelCase, jQuery.nodeName, jQuery.cssNumber, and jQuery.cssProps. These functions originally filled gaps in inconsistent browser implementations, but they largely duplicate what the language itself now offers.

In practice, codebases are expected to swap these helpers for their native equivalents: Array.isArray() in place of jQuery.isArray, JSON.parse() where jQuery.parseJSON used to be, String.prototype.trim() replacing jQuery.trim, and Date.now() for jQuery.now, among others. Migrating in this direction tends to make code more portable and less tied to jQuery‑specific behavior.

On the internals side, array methods such as push, sort, and splice have been removed from the jQuery prototype. These were effectively internal helpers that happened to be exposed, and their removal clarifies that developers should treat jQuery collections differently from plain arrays, even if they sometimes share superficial similarities.

All of this cleanup, combined with dropping special‑case code for older Internet Explorer versions, shrinks the library’s footprint by more than 3 kilobytes in gzip form. For sites that care about every kilobyte, that is a non‑trivial savings, especially when paired with other optimizations.

Standard build, slim build, and file size reductions

File size has always been part of the conversation around jQuery, and version 4 continues the trend toward a leaner core. The minified standard build now weighs in at just under 80 KB, compared with roughly 88 KB for jQuery 3.7.1.

The slim build targets environments that don’t need Ajax or animation support. By removing those modules, jQuery 4’s slim variant drops even further, landing at around 56 KB in one report and roughly 19.5 KB gzipped in another, depending on which metrics and compression details you look at. In any case, the direction is clear: less legacy, smaller bundles.

Beyond Ajax and animation, the slim build also omits Deferreds and Callbacks in the new release. Given that native Promises are now well supported across all target browsers except IE11, the team felt confident that most asynchronous patterns can rely directly on the built‑in language primitives.

Developers who prefer the full API surface can still opt for the standard build, but projects that want to minimize payloads have more options than before. With increasingly strict performance budgets, especially on mobile, the ability to choose a trimmed variant is a practical advantage.

Focus and blur events now follow the W3C spec

One of the subtler yet impactful behavioral changes in jQuery 4 involves focus and blur events on user interface elements. Historically, browsers disagreed about the exact order in which these events fired, leading to hard‑to‑track inconsistencies.

To cope with that, earlier jQuery versions overrode native event ordering to provide a uniform sequence, even if that meant diverging from evolving standards. Developers built code on top of those assumptions, often without realizing that the behavior differed from what browsers were gradually standardizing.

Now that the W3C specification defines a consistent ordering for focus, focusin, focusout and blur, modern browsers have mostly converged on that model. In response, jQuery 4 removes its old override logic and lets the native event order prevail in all supported browsers, aligning with the current spec.

The upside is that behavior becomes more predictable across the ecosystem. The downside is that code which relied on jQuery’s previous ordering may now behave differently, possibly surfacing unexpected edge cases in forms or complex UI interactions. This is one of the areas where running tests and using the updated jQuery Migrate plugin during upgrades can be particularly helpful.

A leaner library, but not everyone agrees on its role

As with any long‑lived technology, opinions on jQuery’s place in 2026 are sharply divided. For some developers, the conclusion is simple: if you are starting a brand‑new web application targeting modern browsers, there seems to be little reason to introduce jQuery at all.

Critics often point to performance and dependency concerns. Native JavaScript is typically faster and avoids adding tens of kilobytes of library code. Older jQuery versions also tend to linger unpatched on production sites, with a non‑trivial share of the web reportedly still running decade‑old 2.x releases.

On the other side of the debate, many practitioners argue that jQuery remains an efficient, pragmatic tool in everyday work. While frameworks like React or Vue dominate large single‑page applications, jQuery can be a simpler fit for incremental enhancements, classic multi‑page sites, or quick prototypes where spinning up a full component pipeline feels excessive.

There are still developers who describe jQuery as one of the few JavaScript libraries that feels consistently pleasant to use, particularly for DOM manipulation and event handling. Its concise syntax, chainable methods, and long‑established idioms can reduce boilerplate and keep small scripts readable.

That contrast of perspectives means jQuery 4 is likely to be interpreted in different ways: as a graceful modernization of a legacy tool by some, and as a minimal maintenance release for a fading era by others. The reality on the ground is that many production sites continue to rely on it, regardless of whether it features in new project templates.

Real‑world usage: when jQuery still saves time

Beyond abstract arguments, stories from day‑to‑day development show how jQuery can still solve certain problems with very little code. One example involves building animated, toggle‑able form fields where some inputs appear only when others are selected or checked.

In that case, a developer initially tried to create the behavior with plain JavaScript, juggling multiple event listeners, CSS transitions and timing issues. After several attempts, the script had grown to more than fifty lines and still suffered from race conditions where animations would conflict or fire out of order.

Eventually, frustration won out and jQuery 4 was added as a dependency. Leveraging its event handling and animation utilities, the same effect was replicated in only a few lines of code. The trade‑off was straightforward: an additional ~80 KB library in exchange for a far simpler implementation and the ability to move on to other features.

Scenarios like this highlight why the library’s long‑standing motto of “write less, do more” still resonates for some teams. Even in an era of native APIs and sophisticated frameworks, there are moments where a small script augmented with jQuery is faster to build and easier to maintain than a fully custom solution.

Of course, that does not mean every project benefits from including jQuery. Modern JavaScript and DOM APIs are more consistent than they used to be, HTML5 and ECMAScript standards have reduced cross‑browser headaches, and for many single‑page applications a framework or no library at all might be the better fit. The point is less that jQuery is universally necessary, and more that it remains a useful option when the problem and constraints align.

From essential abstraction to standard library role

To understand why jQuery 4 focuses on slimming down rather than reinventing itself, it helps to remember how different the landscape looked when the library emerged. Two decades ago, browsers frequently diverged in their interpretation of JavaScript and DOM behavior, making even basic interactions feel fragile.

In that environment, jQuery was not really optional for many teams. It wrapped up Ajax calls, DOM selection, event handling and animation into a consistent API, allowing developers to trust that code would behave similarly across IE, Firefox, Safari and later Chrome. This consistency was critical at a time when Microsoft often pursued its own ideas with Internet Explorer and expected others to follow.

Since then, standards bodies and browser vendors have converged on HTML5, modern ECMAScript versions and far better cross‑browser alignment. Chrome’s engine and its derivatives dominate the market, and the baseline capabilities of browsers are much higher than they were when jQuery first spread through developer circles.

As a result, what jQuery offers today is less about working around incompatibilities and more about acting as a convenient, familiar “standard library” on top of JavaScript. Its function chaining style and terse idioms encourage a relaxed, almost functional way of structuring DOM‑heavy code, even though the underlying language is not purely functional.

For developers who have only ever known modern tooling, the depth of jQuery’s influence can be easy to overlook. Many patterns introduced or popularized by the library have been folded back into the language and the DOM APIs themselves. In that sense, jQuery 4 is not trying to reclaim lost territory so much as keep the library aligned with the ecosystem that grew up around it.

Taken together, the changes in jQuery 4.0.0 – from dropping IE10 to adopting ES modules, Trusted Types, and a slimmer set of APIs – reflect a project that is consciously evolving without abandoning the millions of sites still depending on it. The release doesn’t attempt to compete head‑on with modern frameworks, but it does give teams that continue to use jQuery a version that feels at home in today’s browser and tooling environment, while leaving the door open for gradual migration where that makes sense.

ataque generalizado de la cadena de suministro de NPM
Related article:
Widespread NPM Supply Chain Attack Shakes the JavaScript Ecosystem
Related posts: