On this page
What this issue is
A page has multiple versions of jQuery or React loaded when two or more copies of the same library are downloaded and run. It usually happens by accident. A theme ships its own jQuery, a plugin adds another from a CDN (a public file host), and a page builder or embedded widget brings a third.
With jQuery, each copy sets up its own $ and jQuery object. The last one loaded wins the global name, so plugins that registered on the earlier copy can disappear. With React, two copies in one app can break hooks, with the error Invalid hook call, because components and the renderer must share one instance.
Why it costs you leads or sales
The direct cost is speed. Every extra copy must be downloaded, parsed and run on the main thread, the single lane where the browser also handles taps and clicks. A busy main thread can delay the response to a click on your form button or checkout.
The bigger risk is breakage. A jQuery plugin that handles form validation, a date picker, a popup or a slider may be attached to the old copy and silently stop working. Visitors then click and nothing happens. The business impact is usually low when the page still works, but it rises sharply if the duplicate breaks a form or a payment step.
Example: approximate minified size of extra copies. Real sizes depend on the versions and plugins you load.
- Theme loads jQuery 3.7Form plugin attaches to it
- Widget loads jQuery 1.12Replaces the global $
- Plugin call failsValidation or submit handler missing
- Lead not sentVisitor clicks, nothing happens
The second copy replaces the global $, so the plugin registered on the first copy is gone.
How to check if your site has it
Open the page in Chrome
Use a private window so extensions do not add scripts. Open DevTools with F12 or Cmd+Option+I.
List the loaded scripts
Go to the Network tab, filter by JS, reload, and search for
jquery,reactandreact-dom. More than one file name or version for the same library is a duplicate.Check the live jQuery version
In the Console tab, run
jQuery.fn.jquery. This shows the version that won the global name.Look for hidden copies
Run the snippet below. It lists every script URL that contains jquery or react.
Run a Lighthouse audit
In the Lighthouse tab, run a Performance report and open the Diagnostics. Look for duplicated JavaScript and large script bundles.
[...document.scripts]
.map(s => s.src)
.filter(src => /jquery|react/i.test(src))
.forEach(src => console.log(src));How to fix it
The goal is one copy of each library, at a version every script that needs it supports. Work out which file or plugin adds the extra copy, then remove it or point it at the shared one. Test on a staging copy first, because older plugins may depend on old jQuery features.
Find who loads it
Deactivate plugins one at a time on staging and reload the Network tab until the extra jQuery file disappears. The Query Monitor plugin also lists scripts by the plugin or theme that enqueued them.
Use the bundled jQuery
WordPress ships its own jQuery. Ask the plugin or theme author to use it, or update them. Avoid code that deregisters jQuery and loads a CDN copy unless you must.
Dequeue the duplicate if needed
In a child theme or small plugin, remove the extra script handle with wp_dequeue_script, using the handle shown in Query Monitor.
Search the theme
In Online Store, Themes, Edit code, search for
jqueryin theme.liquid and the Assets folder. Remove extra script tags that load a second copy.Check installed apps
Some apps inject their own jQuery. Disable apps one at a time in a duplicate theme to find the source, then ask the app developer or replace the app.
Review Custom HTML tags
In Tags, look for Custom HTML tags that include a script tag pointing to jQuery or React and remove them if the site already has the library.
Publish and retest
Use Preview mode first, then publish and check the Network tab again.
Check site settings
Webflow loads its own jQuery. In Site settings, Custom code, and in page-level custom code, remove any extra jQuery script tag you added.
Check embeds
Look at Embed elements for third-party snippets that load another jQuery version.
Pick one version
Choose a single jQuery version and load it once, before the scripts that need it. Remove other script tags.
Make React a single instance in bundles
In a bundler, run
npm ls react react-domto find duplicates. Use your package manager's dedupe command, or set resolve.alias in webpack so every import points to one copy. For libraries, list react as a peerDependency.Share via externals if needed
If a widget is built separately, mark react and react-dom as externals so it uses the host page's copy.
npm ls react react-dom
npm dedupeHow to confirm it's fixed
- The Network tab shows only one jQuery file (and one React build) after a hard reload
jQuery.fn.jqueryin the Console returns the version you chose- The Console shows no errors such as
$ is not a functionorInvalid hook call - Your forms validate and submit, and test leads arrive
- Popups, sliders and date pickers still work
- Lighthouse shows less JavaScript than before
How to prevent it happening again
- Check the Network tab after adding any plugin, app, theme or widget
- Prefer plugins that use the library already on the site
- Avoid pasting CDN script tags for jQuery into custom code or tag manager
- Use dependency dedupe and a bundle analyzer in your build
- Test changes on staging and record which scripts load
- Review third-party scripts every few months
How FunnelGuard handles this
This issue is outside what FunnelGuard checks. It is a code and performance matter that needs a different kind of tool: a browser auditing tool such as Chrome DevTools or Lighthouse, or a bundle analyzer for your build.
FunnelGuard is a synthetic monitoring service that runs your real customer journeys on a schedule, such as lead forms and checkouts, and checks each step. It does not inspect which library versions your page loads. Once you have fixed the duplicates, running your key journeys is a useful way to see whether your forms and buttons still work end to end. The Free plan covers 1 site and 2 journeys with daily checks, no card needed.
Questions people ask
Why is my site loading jQuery twice?
Usually a theme and a plugin, app or embedded widget each add their own copy. Open the Network tab, filter by JS and search for jquery to see which files load. Then disable plugins or apps one at a time on staging to find the source.
How do I check which version of jQuery my site uses?
Open the browser Console and run jQuery.fn.jquery. It returns the version of the copy that currently owns the global name. To see every copy, check the Network tab or list script URLs with document.scripts.
Can two versions of jQuery break my form?
Yes. The later copy replaces the global $, so plugins registered on the earlier copy, such as validation or masks, can stop working. The form may then fail to validate or submit without showing an obvious error.
What does Invalid hook call mean in React?
One common cause is two copies of React in the same app, so hooks run against a different instance than the one rendering. Run npm ls react react-dom to find duplicates and dedupe them so one copy is used.
Does loading jQuery twice hurt page speed?
Yes. Each copy has to be downloaded, parsed and run, which adds work on the main thread that also handles clicks. The size of the effect depends on versions and caching, so measure with Lighthouse before and after.
Is it safe to remove the older jQuery version?
Only after testing. Older plugins may use features removed in jQuery 3. Try it on staging, use jQuery Migrate to spot deprecated calls, and check forms, popups and checkout before going live.
Can FunnelGuard detect duplicate jQuery or React?
No. That needs a browser auditing tool such as Chrome DevTools or Lighthouse, or a bundle analyzer. FunnelGuard instead runs your real journeys, like forms and checkouts, to check they complete.
Related issues
- PRF-039INP over 200 ms on a CTA or form interactionFix guide
- PRF-040Long tasks over 50 ms block input during loadFix guide
- PRF-041Total Blocking Time high from heavy third-party tagsFix guide
- PRF-042Submit button unresponsive for seconds while JS loads (dead first click)Fix guide
- PRF-045Too many tag manager tags firing on page loadFix guide
- PRF-047Memory leak makes long sessions/single page apps slowFix guide