On this page
What this issue is
Your browser must download, parse and run every script a page loads. Unused JavaScript is the part of that code which never executes on the page, or does not run until a visitor does something. Lighthouse lists it under the audit called "Reduce unused JavaScript".
Common sources are page builder bundles, sliders, theme scripts, plugins that load on every page, tag manager containers full of old tags, chat widgets and one big app bundle shared by every route.
Why it costs you leads or sales
Every extra kilobyte must travel over the network and then be parsed and compiled. On a mid-range phone that work blocks the main thread, so the page paints later and buttons respond late. Slow landing pages lose visitors before they see your offer, and paid clicks are wasted.
- Ad clickVisitor lands on the page
- Download scriptsOver 500 KB of unused code fetched
- Main thread busyParsing delays the hero and clicks
- Form submittedVisitor has already left
Large bundles compete with the hero content and delay everything after them.
Example: illustrative numbers for a mobile landing page, not measured results.
How to check if your site has it
Run Lighthouse
In Chrome, open DevTools (F12), choose the Lighthouse tab, select Mobile and run a report. Open the "Reduce unused JavaScript" audit to see each file and its wasted bytes.
Try PageSpeed Insights
Paste the URL into pagespeed.web.dev for the same audit plus real-user data where available.
Use the Coverage tab
In DevTools press Ctrl+Shift+P (Cmd+Shift+P on Mac), type "Show Coverage", click reload and sort by Unused Bytes.
Identify the owner
Check each large file's path. It usually points to a theme, a plugin, a tag manager container or a third-party domain.
How to fix it
Work from the biggest file down. For each one, decide: remove it, load it only on pages that need it, delay it, or split it.
Find the plugin behind the file
The file path in Lighthouse usually contains /wp-content/plugins/name/. Deactivate plugins you do not use.
Load scripts only where needed
Use a plugin that lets you disable scripts per page (for example Asset CleanUp or Perfmatters), or dequeue them in code. Test the page after each change.
Delay non-essential scripts
Use your caching or optimisation plugin's defer or delay-until-interaction option for chat, sliders and widgets. Do not delay scripts your form needs.
Audit installed apps
Many apps add scripts to every page. Remove apps you no longer use, then check the theme code for leftover app snippets.
Remove leftovers in the theme
In Online Store > Themes > Edit code, search theme.liquid for script tags from removed apps and delete them.
Limit scripts to the templates that need them
Wrap a script in a template check so it only loads where used.
Review tags
Open the container and look for paused, duplicate or old tags and custom HTML tags that load libraries.
Tighten triggers
Change All Pages triggers to specific pages for tags that only matter on some pages.
Remove and publish
Delete unused tags, use Preview to confirm key tags still fire, then publish.
Check custom code
In Project Settings > Custom Code and each page's settings, remove libraries you no longer use.
Move scripts to specific pages
Put page-only scripts in that page's custom code instead of the site-wide footer.
Trim interactions
Remove unused interactions and animations, which add to the Webflow runtime.
Clean tracking code
In the funnel or website settings, remove old tracking and custom code from the header and footer.
Remove unused elements
Delete hidden sections, pop-ups and widgets you do not use on the page.
Limit chat widgets
Load chat or third-party widgets only on pages where visitors need them.
Remove unused apps
In the dashboard, open Apps and remove those you do not use. Each one can add scripts.
Simplify the page
Remove heavy elements such as unused galleries, sliders and animations from the landing page.
Review custom code
In Settings > Custom Code, delete old tracking snippets.
Check Code Injection
In Settings > Developer Tools > Code Injection, remove old scripts.
Remove unused extensions
Disconnect extensions and third-party integrations you no longer need.
Simplify sections
Drop unused galleries, embeds and animations from the landing page.
Split by route
Use dynamic import() so code for a route or widget loads only when needed. Bundlers such as webpack, Vite and Rollup split these automatically.
Remove dead code
Use ES modules and tree shaking, and replace heavy libraries with lighter ones or native browser features.
Defer the rest
Add defer to scripts that are not needed for first paint.
const button = document.querySelector('#open-chat');
button.addEventListener('click', async () => {
const { startChat } = await import('./chat-widget.js');
startChat();
}, { once: true });<script src="/js/carousel.js" defer></script>How to confirm it's fixed
- Re-run Lighthouse on mobile and compare the unused JavaScript total with the first run.
- Check that the largest files in Coverage are gone or much smaller.
- Reload the page and make sure menus, sliders and pop-ups still work.
- Submit a test lead and confirm it reaches your inbox or CRM.
- Check your ad and analytics tags still fire, for example in tag manager Preview mode.
- Re-test LCP on the real landing page after a few days of field data.
How to prevent it happening again
- Ask what a new plugin, app or tag adds in kilobytes before installing it.
- Remove tools when a campaign or trial ends.
- Review your tag manager container every quarter.
- Set a script budget for landing pages and run Lighthouse after each release.
- Load widgets on interaction instead of on page load.
How FunnelGuard handles this
This issue is outside what FunnelGuard checks. FunnelGuard runs your real customer journeys on a schedule and checks that steps work, tracking hits are sent and test leads arrive. It does not measure how much JavaScript a page ships or how much of it goes unused.
For this issue, use a page performance tool: Lighthouse, PageSpeed Insights or WebPageTest for lab tests, plus a bundle analyzer such as webpack-bundle-analyzer if you build your own code. FunnelGuard fits alongside them to confirm that your forms and tracking still work after you remove or delay scripts.
Questions people ask
What does unused JavaScript mean in Lighthouse?
It means the page downloaded JavaScript that did not run during load. Lighthouse lists each file with the bytes it could save if the unused part were removed or delayed. It is a hint to investigate, not always an error.
How do I find unused JavaScript on my website?
Run Lighthouse in Chrome DevTools and open the "Reduce unused JavaScript" audit. For more detail, open the Coverage tab (Ctrl+Shift+P, then "Show Coverage"), reload the page and sort by unused bytes.
How much unused JavaScript is too much?
There is no fixed limit, but over 500 KB of unused code is a clear sign of trouble on a landing page. Aim to cut the largest files first, especially those on mobile.
Does unused JavaScript hurt SEO?
It can, indirectly. Extra code slows loading and can worsen Largest Contentful Paint, which is part of Google's page experience signals. It also costs conversions when visitors leave a slow page.
How do I remove unused JavaScript in WordPress?
Deactivate plugins you do not use, then use a script manager plugin such as Asset CleanUp or Perfmatters to stop scripts loading on pages that do not need them. Test your forms and tracking afterwards.
Will deferring JavaScript fix unused JavaScript warnings?
Not fully. Defer stops scripts blocking rendering, but the bytes are still downloaded, so Lighthouse may still report them. To cut the bytes, remove the script or split it so it loads only when needed.
Can tag manager tags cause unused JavaScript?
Yes. Old, duplicate or broadly triggered tags can load large libraries on every page. Remove tags you do not use and limit triggers to the pages where each tag matters.
Does FunnelGuard detect unused JavaScript?
No. FunnelGuard checks that journeys, tracking hits and test leads work, not how much code a page loads. Use Lighthouse, PageSpeed Insights or WebPageTest for this issue.
Related issues
- PRF-001LCP over 2.5 s on a funnel stepFix guide
- PRF-002LCP over 4 s on mobile (poor) on the paid landing pageFix guide
- PRF-012Render-blocking synchronous JS in <head> (jQuery, sliders)Fix guide
- PRF-013Unused CSS over 200 KB (page builder bundles)Fix guide
- PRF-015Page builder (Elementor/Divi) loads every widget's assets on every pageFix guide
- PRF-016Client-side rendered page shows blank until JS bundle runsFix guide