Find the right software version for your system

Two jQuery releases. Which update should you merge?

Two illustrative pull requests start from the same jQuery 3.7.1 dependency. The right one depends on what you need this merge to accomplish.

Stay on 3.x for now

3.7.1 → 3.8.0

Choose this if you need the fixes now and a required browser or plugin still blocks the major upgrade. Run regression tests before merging.

3.8.0 release tag

Move to the active branch

3.7.1 → 4.1.0

Choose this if you can validate the major upgrade now. Use the full build if your app or its plugins need jQuery.Deferred.

4.1.0 release tag

Both shipped on and include a selector security fix. jQuery plans to limit future 3.x maintenance to critical security and bug fixes. Active development is on 4.x. Official announcement

Three checks before you merge

Browsers

Run your smoke tests in the browsers your app supports. jQuery 4.x supports IE11 in standards mode and Edge IE mode with the IE11 document mode. An IE9, IE10 or Edge Legacy requirement points to 3.x. Browser support

If your app reads jqXHR.responseURL, exercise an actual redirect with modern XHR and handle a missing value. IE11 and the script and JSONP transports leave it unset. 4.1.0 release notes

Plugins

Check the exact plugin versions you ship. Search your code and plugins for $.expr[":"], $.expr.filters and push, sort or splice called on jQuery collections. 3.8.0 formally deprecates these APIs. 4.x removes them. Use $.expr.pseudos for custom pseudos. 3.8.0 release notes · 4.0 upgrade guide

For a 4.x migration, load uncompressed Migrate 4.x after jQuery in staging. Run plugin initialization and the user flows that exercise each plugin. Resolve the warnings, then remove Migrate and rerun those flows. Migrate steps

Builds

Check the script URL or bundler import and inspect the loaded file on the page you plan to ship. Keep the build flavor constant if the goal is only a version bump. The 4.x slim build omits Ajax and effects, plus Callbacks, Deferred and the queue module. Test the APIs your app and plugins actually call against the intended artifact. Build downloads · Slim build changes

Same release, different file

We loaded each official 4.1.0 file locally and ran the same expressions. The full build could create a Deferred. The slim build threw at that specific call.

jquery-4.1.0.jsFull
> jQuery.fn.jquery
4.1.0

> typeof jQuery.Deferred
function

> jQuery.Deferred().state()
pending
jquery-4.1.0.slim.jsSlim
> jQuery.fn.jquery
4.1.0+slim

> typeof jQuery.Deferred
undefined

> jQuery.Deferred().state()
TypeError: jQuery.Deferred is not a function

Tested in Chrome on macOS with each unminified file loaded from disk.

Sources and scope

This guide answers

Should I update to jQuery 3.8.0 or jQuery 4.1.0?

What this cannot prove

The build test covers one direct Deferred call with the official 4.1.0 browser scripts. Check your own plugin versions and required browsers before merging.

Editorial review by What-Version Editorial · reviewed · official sources checked

Official and methodology sources