Skip to content
FunnelGuard

Fix guide by FunnelsGuard

jQuery CDN outage breaking your site: how to find and fix it

OPS-220High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

A CDN (content delivery network) is a network of servers that hosts shared files, such as jQuery, so your page can load them from a third party instead of from your own server. Many themes, plugins, form builders and page builders pull jQuery or other libraries from a CDN like cdnjs, jsDelivr, unpkg or code.jquery.com.

How one failed CDN file breaks the funnel
  1. Page loadsHTML and CSS render normally
  2. CDN requestjQuery file fails to download
  3. Form or menu scriptjQuery is not defined, script stops
  4. Lead or orderSubmit or checkout never completes

The page renders, but scripts that depend on the library stop running.

Why it costs you leads or sales

Form submissions before and during a CDN failureExample numbers
Form submissions before and during a CDN failure (example)Normal day: 40 submissions per day; CDN failure day: 6 submissions per day01531406Normal dayCDN failure daysubmissions per day

Example: illustrative numbers for a site whose form depends on a CDN-hosted jQuery file.

How to check if your site has it

Check for a failing library in your browser
  1. Open the page and the console

    Load the affected page in Chrome, press F12 and open the Console tab. Look for red errors such as 'jQuery is not defined' or '$ is not defined'.

  2. Check the Network tab

    Open Network, reload, and filter by JS. Look for rows in red, or with status 403, 404 or 5xx, or 'blocked'. Note the domain, for example cdnjs.cloudflare.com or code.jquery.com.

  3. Find where it is loaded

    View page source and search for 'jquery' and 'cdn'. Check your theme, plugins and tag manager tags too, since they can inject libraries.

  4. Test the interactions

    Submit the form, open the menu, add to cart. If they fail only when the console shows the error, the library is the cause.

  5. Check the CDN status

    Visit the CDN provider's status page to see if there is an incident, and open the script URL directly in a new tab to see if it loads.

How to fix it

Load jQuery from a CDN with a local fallbackhtml
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script>
  window.jQuery || document.write('<script src="/js/vendor/jquery-3.7.1.min.js"><\/script>');
</script>
Fix it on your platform
  1. Use the bundled jQuery

    WordPress ships its own jQuery. If a theme or plugin replaces it with a CDN version via wp_deregister_script('jquery'), remove that code or check the plugin's settings for a 'load jQuery from CDN' option and turn it off.

  2. Self-host other libraries

    Download the file, upload it to your theme or child theme, and enqueue it with wp_enqueue_script using a local path.

CDN dependency vs resilient setup

Before

  • jQuery loads only from a third-party CDN
  • CDN down means forms and menus fail
  • No one notices until leads drop

After

  • Library served from your own domain or with a local fallback
  • Page keeps working if the CDN fails
  • Console errors are monitored

How to confirm it's fixed

Confirmation checks
  • The console shows no 'jQuery is not defined' errors after a hard reload
  • The Network tab shows the library loading with status 200
  • Block the CDN domain in DevTools (Network request blocking) and confirm the page still works through the fallback
  • The form submits and the lead reaches your inbox or CRM
  • Menus, popups and add-to-cart work on mobile and desktop

How to prevent it happening again

Prevention habits
  • Self-host libraries that forms, checkout or tracking depend on
  • Pin exact library versions
  • Keep a local fallback for any CDN script you retain
  • Remove scripts no longer used by your theme or plugins
  • Re-test key journeys after theme, plugin or tag changes
  • Monitor key pages for console errors

How FunnelGuard handles this

Frequently asked questions

Questions people ask

Why is my form not working when the page looks normal?

A script the form depends on may have failed to load, for example jQuery from a CDN. Open the browser console and look for 'jQuery is not defined' or red failed requests in the Network tab. If you see them, the library is the cause.

What does 'jQuery is not defined' mean?

It means code tried to use jQuery before it was loaded, or the jQuery file never loaded at all. Common causes are a CDN outage, a blocked or wrong URL, a bad SRI hash, or scripts loading in the wrong order.

How do I add a fallback if the jQuery CDN fails?

After the CDN script tag, add a small script that checks window.jQuery and, if it is missing, writes a script tag pointing to a copy on your own server. This keeps the page working when the CDN is down.

Should I self-host jQuery or use a CDN?

For scripts that forms, checkout or tracking depend on, self-hosting is safer because you control availability. A CDN can be faster, but only use one with a local fallback.

How can I tell if a CDN is down?

Open the script URL directly in your browser and check the provider's status page. Also test from another network, because outages can be regional.

Can a CDN outage affect my ad tracking?

Yes. If your tracking or event code relies on a library that fails to load, conversion events may not fire, so ad platforms get less data until it is fixed.

How can I be alerted when a library fails to load?

Use monitoring that runs your real journeys and reports console errors. FunnelGuard does this on a schedule and sends one alert with a screenshot and a likely cause after re-checking from a second region.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: Console errors.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.