{"id":560,"date":"2026-11-27T06:29:33","date_gmt":"2026-11-26T19:29:33","guid":{"rendered":"https:\/\/uxrobot.ai\/ux-audits\/?post_type=guide&#038;p=560"},"modified":"2026-11-27T06:29:33","modified_gmt":"2026-11-26T19:29:33","slug":"reduce-unused-javascript","status":"publish","type":"guide","link":"https:\/\/uxrobot.ai\/ux-audits\/guides\/reduce-unused-javascript\/","title":{"rendered":"Reduce unused JavaScript: what it means and how to fix it"},"content":{"rendered":"\n<p class=\"has-lead-font-size wp-block-paragraph\">If PageSpeed Insights or Lighthouse tells you to \u201cReduce unused JavaScript\u201d, your page downloads scripts that it does not run while it loads. Phones fetch those bytes, unpack them and often execute parts of them before the visitor can do anything, so the page appears later and answers taps more slowly. This guide explains what the warning measures, how to find which files cause it, and how to reduce unused JavaScript without breaking your website. The examples are real: UX Robot page audits of Target\u2019s and Wayfair\u2019s home pages on a phone in November 2026.<\/p>\n\n\n\n<div class=\"uxa-gd-takeaways\">\n    <p class=\"uxa-kicker\">In short<\/p>\n    <ul>\n        <li>Lighthouse lists any script with more than 20 KiB it did not use while the page loaded, and estimates the download you would save.<\/li>\n        <li>The warning itself does not change your performance score. The time those scripts cost shows up in the measures that do, mainly Largest Contentful Paint and Total Blocking Time.<\/li>\n        <li>Most unused JavaScript comes from two places: one big bundle that holds code for every page, and other companies\u2019 tags such as ads, analytics and session recording.<\/li>\n        <li>The fixes are to split bundles by page and feature, load code when the visitor needs it, remove tags nobody uses and delay the rest until after the page has appeared.<\/li>\n        <li>On Target\u2019s home page Lighthouse estimated 1,235 KiB of unused JavaScript; on Wayfair\u2019s, 473 KiB.<\/li>\n    <\/ul>\n<\/div>\n\n\n\n<nav class=\"uxa-gd-toc\" aria-label=\"In this guide\" data-uxa-toc><p class=\"uxa-kicker\">In this guide<\/p><ol><li><a href=\"#what-it-means\">What \u201cReduce unused JavaScript\u201d means<\/a><\/li><li><a href=\"#why-it-matters\">Why unused JavaScript slows the page for visitors<\/a><\/li><li><a href=\"#real-examples\">Two real examples: Target and Wayfair<\/a><\/li><li><a href=\"#find-the-files\">How to find which scripts are unused<\/a><\/li><li><a href=\"#how-to-fix\">How to reduce unused JavaScript<\/a><\/li><li><a href=\"#related-warnings\">Related warnings: main-thread work and render-blocking resources<\/a><\/li><li><a href=\"#check-the-fix\">How to check the fix worked for real visitors<\/a><\/li><li><a href=\"#reduce-unused-javascript-faq\">Questions about unused JavaScript<\/a><\/li><\/ol><\/nav>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-it-means\">What \u201cReduce unused JavaScript\u201d means<\/h2>\n\n\n\n<p class=\"uxa-gd-answer wp-block-paragraph\">It means Lighthouse watched your page load and found script files where a large part of the code never ran. It lists each file with its size and the bytes it did not use, and adds up an estimated saving. Unused here means unused during page load, not useless.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While the page loads, Lighthouse records which parts of every JavaScript file the browser actually executes. Google\u2019s <a href=\"https:\/\/developer.chrome.com\/docs\/lighthouse\/performance\/unused-javascript\/\">documentation for the audit<\/a> says Lighthouse \u201cflags every JavaScript file with more than 20 kibibytes of unused code\u201d. A kibibyte (KiB) is 1,024 bytes, so 20 KiB is roughly 20 kilobytes. Smaller leftovers are ignored, which is why a page can pass the audit and still carry some dead weight.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The report shows each file\u2019s address, its transfer size and the potential savings, then a total such as \u201cEst savings of 473 KiB\u201d. PageSpeed Insights shows the same audit, because it runs Lighthouse on Google\u2019s servers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Two things are worth knowing before you start deleting code. First, code that did not run during load may still be needed later, when someone opens the menu, filters products or adds something to the cart. The aim is to stop sending it up front, not to remove features. Second, the number is an estimate from one load of one page. Run it on a few templates, such as home, category, product and checkout, before you decide what to change.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"why-it-matters\">Why unused JavaScript slows the page for visitors<\/h2>\n\n\n\n<p class=\"uxa-gd-answer wp-block-paragraph\">Every script has to be downloaded, and most are also parsed and compiled before they run. On a phone that work competes with drawing the page and answering taps. Less JavaScript means the main content appears sooner and the page responds when people first touch it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Images can arrive and appear in any order, but JavaScript sits on the browser\u2019s main thread, the same thread that lays out the page and reacts to taps and typing. While it is busy with scripts, a tap on a menu button waits. Lighthouse measures that waiting as Total Blocking Time, and real visitors feel it as Interaction to Next Paint, which Google says should be \u201c200 milliseconds or less\u201d for a good experience in its <a href=\"https:\/\/web.dev\/articles\/optimize-inp\">guide to optimizing INP<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unused code also costs data. A shopper on a capped plan pays for every kilobyte, and on a weak connection each extra file delays the ones that matter. Google\u2019s <a href=\"https:\/\/developer.chrome.com\/docs\/lighthouse\/performance\/performance-scoring\">scoring page<\/a> is clear that \u201conly metrics contribute to your Lighthouse Performance score, not the results of Opportunities or Diagnostics\u201d, but it adds that fixing them will likely improve the metric values. In Lighthouse 10 and later, Total Blocking Time counts for 30% of the score and Largest Contentful Paint for 25%, and scripts weigh on both.<\/p>\n\n\n\n<div class=\"uxa-sc-stats\" aria-label=\"Figures on JavaScript size and unused JavaScript from the HTTP Archive Web Almanac 2024\">\n    <div class=\"uxa-sc-stats__item\">\n        <span class=\"uxa-sc-stats__number\" data-uxa-count=\"558\" data-uxa-suffix=\" KB\">558 KB<\/span>\n        <span class=\"uxa-sc-stats__label\">JavaScript on the median mobile page (Web Almanac 2024, June 2024 crawl).<\/span>\n    <\/div>\n    <div class=\"uxa-sc-stats__item\">\n        <span class=\"uxa-sc-stats__number\" data-uxa-count=\"206\" data-uxa-suffix=\" KB\">206 KB<\/span>\n        <span class=\"uxa-sc-stats__label\">Unused during page load on the median mobile page, 44% of the JavaScript it receives.<\/span>\n    <\/div>\n    <div class=\"uxa-sc-stats__item\">\n        <span class=\"uxa-sc-stats__number\" data-uxa-count=\"22\">22<\/span>\n        <span class=\"uxa-sc-stats__label\">JavaScript requests on the median mobile page; 68 at the 90th percentile.<\/span>\n    <\/div>\n    <div class=\"uxa-sc-stats__item\">\n        <span class=\"uxa-sc-stats__number\" data-uxa-count=\"30\" data-uxa-suffix=\"%\">30%<\/span>\n        <span class=\"uxa-sc-stats__label\">Weight of Total Blocking Time in the Lighthouse performance score (Chrome for Developers).<\/span>\n    <\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The problem is common. The <a href=\"https:\/\/almanac.httparchive.org\/en\/2024\/javascript\">JavaScript chapter of the HTTP Archive Web Almanac 2024<\/a>, based on pages crawled in June 2024, found the median JavaScript payload \u201creaching 558 kilobytes on mobile\u201d, with roughly half of the bytes downloaded going unused during page load: 206 kilobytes, or 44%, at the median on mobile. At the 90th percentile the unused share reached 818 kilobytes. The same chapter shows the median mobile page receiving more of its JavaScript from other companies\u2019 hosts (375 KB) than from its own (168 KB), which matters for where you look first.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"real-examples\">Two real examples: Target and Wayfair<\/h2>\n\n\n\n<p class=\"uxa-gd-answer wp-block-paragraph\">Lighthouse estimated 1,235 KiB of unused JavaScript on Target\u2019s home page and 473 KiB on Wayfair\u2019s, in UX Robot page audits on a phone on November 26, 2026. Both pages mix their own framework bundles with other companies\u2019 tags, and both spend seconds running scripts before they settle.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We ran UX Robot page audits of <a href=\"https:\/\/www.target.com\/\">Target\u2019s home page<\/a> and <a href=\"https:\/\/www.wayfair.com\/\">Wayfair\u2019s home page<\/a> on a 390 by 844 pixel phone screen, signed out, during their Black Friday sales. Each audit measures the page with Lighthouse on UX Robot\u2019s server and checks it in a real browser. Both pages do a lot well: clear deal sections, real-text prices and product names, alt text on every visible image and menus that opened in about a tenth of a second when we tapped them. The figures below are one lab test of one page each on a busy sales day; the pages may have changed since.<\/p>\n\n\n\n<div class=\"uxa-sc-phones is-pair uxa-sc-reveal\">\n    <figure class=\"uxa-sc-phone\">\n        <div class=\"uxa-sc-phone__head\"><span class=\"uxa-kicker\">Target: 1,235 KiB unused<\/span><span class=\"uxa-sc-tag is-basis\">Measured<\/span><\/div>\n        <img src=\"https:\/\/uxrobot.ai\/ux-audits\/wp-content\/uploads\/2026\/11\/guide-reduce-unused-javascript-target-home-page-phone.jpg\" width=\"780\" height=\"1688\" loading=\"lazy\" decoding=\"async\" alt=\"Target's home page on a phone on November 26, 2026, with the search bar, a Sign in for the best experience panel open on arrival and the Black Friday 4-day deals hero below it\">\n        <figcaption>Target\u2019s home page as the audit saw it. Lighthouse estimated 1.66 seconds of load time in its unused scripts.<\/figcaption>\n    <\/figure>\n    <figure class=\"uxa-sc-phone\">\n        <div class=\"uxa-sc-phone__head\"><span class=\"uxa-kicker\">Wayfair: 473 KiB unused<\/span><span class=\"uxa-sc-tag is-basis\">Measured<\/span><\/div>\n        <img src=\"https:\/\/uxrobot.ai\/ux-audits\/wp-content\/uploads\/2026\/11\/guide-reduce-unused-javascript-wayfair-home-page-phone.jpg\" width=\"780\" height=\"1688\" loading=\"lazy\" decoding=\"async\" alt=\"Wayfair's home page on a phone on November 26, 2026, with the search box, an orange Black Friday strip and a Sealy mattress offer of up to 60% off in the hero\">\n        <figcaption>Wayfair\u2019s home page as the audit saw it. Lighthouse estimated 0.45 seconds in its unused scripts.<\/figcaption>\n    <\/figure>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Target.<\/strong> The audit scored the page 35 for performance on a phone, with the main content appearing after 10.1 seconds in the lab and 3,962 milliseconds of Total Blocking Time. Lighthouse spent 11.5 seconds running JavaScript and estimated 1,235 KiB of unused JavaScript, worth 1.66 seconds of load time. UX Robot rated the unused JavaScript high severity because of that saving. The five largest files tell a typical story: the site\u2019s own Next.js app bundle and shared vendor bundle, Google\u2019s ad library, a script served from target.com itself, and FullStory\u2019s session recording script.<\/p>\n\n\n\n<figure class=\"uxa-gd-chart\">\n    <span class=\"uxa-kicker\">Target home page: unused JavaScript in the five largest files, KiB<\/span>\n    <ul class=\"uxa-sc-bars\" aria-label=\"Unused JavaScript in the five largest files on Target's home page, in KiB\">\n        <li><span class=\"uxa-sc-bars__label\">_app bundle (assets.targetimg1.com)<\/span><span class=\"uxa-sc-bars__value\">243 KiB<\/span><span class=\"uxa-sc-bars__track\"><span class=\"uxa-sc-bars__fill\" style=\"--uxa-target:100%\"><\/span><\/span><\/li>\n        <li><span class=\"uxa-sc-bars__label\">pubads_impl.js (Google ads)<\/span><span class=\"uxa-sc-bars__value\">118 KiB<\/span><span class=\"uxa-sc-bars__track\"><span class=\"uxa-sc-bars__fill\" style=\"--uxa-target:48.6%\"><\/span><\/span><\/li>\n        <li><span class=\"uxa-sc-bars__label\">vendor bundle (assets.targetimg1.com)<\/span><span class=\"uxa-sc-bars__value\">93 KiB<\/span><span class=\"uxa-sc-bars__track\"><span class=\"uxa-sc-bars__fill\" style=\"--uxa-target:38.3%\"><\/span><\/span><\/li>\n        <li><span class=\"uxa-sc-bars__label\">script on www.target.com<\/span><span class=\"uxa-sc-bars__value\">71 KiB<\/span><span class=\"uxa-sc-bars__track\"><span class=\"uxa-sc-bars__fill\" style=\"--uxa-target:29.2%\"><\/span><\/span><\/li>\n        <li><span class=\"uxa-sc-bars__label\">fs.js (FullStory)<\/span><span class=\"uxa-sc-bars__value\">70 KiB<\/span><span class=\"uxa-sc-bars__track\"><span class=\"uxa-sc-bars__fill\" style=\"--uxa-target:28.8%\"><\/span><\/span><\/li>\n    <\/ul>\n    <figcaption>The five files Lighthouse listed first account for 595 of the 1,235 KiB. Measured in a UX Robot page audit on November 26, 2026.<\/figcaption>\n<\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Wayfair.<\/strong> Wayfair scored 36, with the main content at 11.2 seconds in the lab and 2,888 milliseconds of Total Blocking Time. Lighthouse spent 8.3 seconds running JavaScript and estimated 473 KiB of unused JavaScript, worth 0.45 seconds, which UX Robot rated medium. Here the largest unused file is a script on Wayfair\u2019s own prx.wayfair.com subdomain, followed by Quantum Metric\u2019s analytics script and three chunks of the site\u2019s own Next.js build. Wayfair\u2019s bundles are already split into many small chunks, which is why its own files are smaller than Target\u2019s single app bundle.<\/p>\n\n\n\n<figure class=\"uxa-gd-chart\">\n    <span class=\"uxa-kicker\">Wayfair home page: unused JavaScript in the five largest files, KiB<\/span>\n    <ul class=\"uxa-sc-bars\" aria-label=\"Unused JavaScript in the five largest files on Wayfair's home page, in KiB\">\n        <li><span class=\"uxa-sc-bars__label\">main.min.js (prx.wayfair.com)<\/span><span class=\"uxa-sc-bars__value\">109 KiB<\/span><span class=\"uxa-sc-bars__track\"><span class=\"uxa-sc-bars__fill\" style=\"--uxa-target:44.9%\"><\/span><\/span><\/li>\n        <li><span class=\"uxa-sc-bars__label\">quantum-wayfair.js (Quantum Metric)<\/span><span class=\"uxa-sc-bars__value\">68 KiB<\/span><span class=\"uxa-sc-bars__track\"><span class=\"uxa-sc-bars__fill\" style=\"--uxa-target:28%\"><\/span><\/span><\/li>\n        <li><span class=\"uxa-sc-bars__label\">chunk 40427 (assets.wfcdn.com)<\/span><span class=\"uxa-sc-bars__value\">55 KiB<\/span><span class=\"uxa-sc-bars__track\"><span class=\"uxa-sc-bars__fill\" style=\"--uxa-target:22.6%\"><\/span><\/span><\/li>\n        <li><span class=\"uxa-sc-bars__label\">chunk 3209 (assets.wfcdn.com)<\/span><span class=\"uxa-sc-bars__value\">46 KiB<\/span><span class=\"uxa-sc-bars__track\"><span class=\"uxa-sc-bars__fill\" style=\"--uxa-target:18.9%\"><\/span><\/span><\/li>\n        <li><span class=\"uxa-sc-bars__label\">chunk 24666 (assets.wfcdn.com)<\/span><span class=\"uxa-sc-bars__value\">38 KiB<\/span><span class=\"uxa-sc-bars__track\"><span class=\"uxa-sc-bars__fill\" style=\"--uxa-target:15.6%\"><\/span><\/span><\/li>\n    <\/ul>\n    <figcaption>The five files Lighthouse listed first account for 316 of the 473 KiB. Bars use the same scale as Target\u2019s chart. Measured in a UX Robot page audit on November 26, 2026.<\/figcaption>\n<\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Neither result means these teams did something careless. Large retailers run ads, analytics, testing and bot protection on their home pages for good reasons, and each tag arrives with code for features the home page never uses. The lesson is in the split: some of the waste is the site\u2019s own code, which developers can change today, and some belongs to other companies, which only a decision about whether and when to load that tag can change.<\/p>\n\n\n\n<aside class=\"uxa-check is-inline\" data-uxa-check=\"inline\"><p class=\"uxa-kicker\">Check your page<\/p><p class=\"uxa-check__title\">How much unused JavaScript does your page load?<\/p><p class=\"uxa-check__text\">Type your address and UX Robot runs Lighthouse on a phone and checks real-visitor speed, accessibility and search in about a minute, free and without signing up.<\/p><form class=\"uxa-check-form\" action=\"\/\" method=\"get\" data-uxa-check-form><label class=\"uxa-check-form__label\" for=\"uxa-check-inline-1\">Your page\u2019s address<\/label><span class=\"uxa-check-form__row\"><input class=\"uxa-check-form__input\" id=\"uxa-check-inline-1\" type=\"text\" name=\"website\" inputmode=\"url\" autocomplete=\"url\" autocapitalize=\"off\" spellcheck=\"false\" maxlength=\"255\" placeholder=\"yourwebsite.com\" required><button class=\"uxa-check-form__button\" type=\"submit\">Check my page<\/button><\/span><input type=\"hidden\" name=\"utm_source\" value=\"blog\"><input type=\"hidden\" name=\"utm_medium\" value=\"guide\"><input type=\"hidden\" name=\"utm_campaign\" value=\"speed\"><input type=\"hidden\" name=\"utm_content\" value=\"reduce-unused-javascript\"><input type=\"hidden\" name=\"utm_term\" value=\"inline\"><\/form><\/aside>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"find-the-files\">How to find which scripts are unused<\/h2>\n\n\n\n<p class=\"uxa-gd-answer wp-block-paragraph\">Start with the files Lighthouse lists, then open Chrome DevTools\u2019 Coverage panel to see exactly which lines ran. Sort by unused bytes, note who owns each file, and decide whether it should load later, load on fewer pages or not load at all.<\/p>\n\n\n\n<ol class=\"uxa-gd-steps\">\n    <li><strong>Read the Lighthouse list<\/strong><span>In PageSpeed Insights or the Lighthouse panel in DevTools, open Reduce unused JavaScript and copy the file addresses with their sizes and savings.<\/span><\/li>\n    <li><strong>Open the Coverage panel<\/strong><span>In Chrome DevTools, open the Command Menu, type \u201ccoverage\u201d and choose Show Coverage. It opens in the drawer at the bottom.<\/span><\/li>\n    <li><strong>Record a page load<\/strong><span>Click the reload button in the panel. Chrome reloads the page and lists each file with its total bytes and unused bytes. In Google\u2019s words, \u201cThe gray section of the bar is unused bytes. The green section is used bytes.\u201d<\/span><\/li>\n    <li><strong>Open a file to see the lines<\/strong><span>Click a row to open the file in the Sources panel, where executed and unexecuted lines are marked in the margin. Source maps make bundled code readable.<\/span><\/li>\n    <li><strong>Use the page, then look again<\/strong><span>Open the menu, search and scroll. Code that runs only now is a good candidate to load on interaction instead of on page load.<\/span><\/li>\n    <li><strong>Label every file by owner<\/strong><span>Your own bundles go to the developers; ads, analytics, chat and testing tags go to whoever added them, usually through a tag manager.<\/span><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Google\u2019s <a href=\"https:\/\/developer.chrome.com\/docs\/devtools\/coverage\">Coverage panel guide<\/a> also lets you switch between measuring per function and per block, and export the results. If you use a bundler such as webpack, Vite or Rollup, a bundle analyzer plugin shows which packages make up each file, which quickly reveals a date library, an icon set or a whole component library imported for one small use.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-fix\">How to reduce unused JavaScript<\/h2>\n\n\n\n<p class=\"uxa-gd-answer wp-block-paragraph\">Send each page only the code it needs to appear and respond, and load the rest when it is needed. In practice that means splitting bundles, importing less, loading features and widgets on interaction, and removing or delaying other companies\u2019 tags.<\/p>\n\n\n\n<div class=\"uxa-sc-board-wrap\">\n    <span class=\"uxa-kicker\">Common causes and their fixes<\/span>\n    <table class=\"uxa-sc-board\">\n        <thead>\n            <tr><th scope=\"col\">What you see in the list<\/th><th scope=\"col\">Why it is unused<\/th><th scope=\"col\">The fix<\/th><\/tr>\n        <\/thead>\n        <tbody>\n            <tr><th scope=\"row\">One big app or main bundle<\/th><td>It holds code for every page and feature, and this page uses a slice of it.<\/td><td>Split by route and feature with dynamic <code>import()<\/code>, so each page loads its own chunk.<\/td><\/tr>\n            <tr><th scope=\"row\">A vendor bundle of libraries<\/th><td>Whole libraries are imported for one or two functions.<\/td><td>Import only what you use, use smaller libraries, and let tree shaking drop unused exports.<\/td><\/tr>\n            <tr><th scope=\"row\">Ads, analytics or session recording<\/th><td>The tag ships its full feature set to every page.<\/td><td>Remove tags nobody reads, limit them to the pages that need them, and start them after the page has loaded.<\/td><\/tr>\n            <tr><th scope=\"row\">Chat, video or map widgets<\/th><td>The full widget loads although few visitors open it.<\/td><td>Show a simple button that looks like the widget and load the real one when someone taps it.<\/td><\/tr>\n            <tr><th scope=\"row\">Plugin scripts on WordPress or Shopify<\/th><td>Plugins and apps load their scripts on every page.<\/td><td>Remove unused plugins and apps, and load the rest only on the pages they serve.<\/td><\/tr>\n            <tr><th scope=\"row\">Polyfills for old browsers<\/th><td>Code that makes new features work in old browsers runs nowhere today.<\/td><td>Build for the browsers your visitors use; Lighthouse reports this separately as Legacy JavaScript.<\/td><\/tr>\n        <\/tbody>\n    <\/table>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Split your own bundles<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Code splitting means breaking one large file into smaller ones that load when needed. As the web.dev article on <a href=\"https:\/\/web.dev\/articles\/reduce-javascript-payloads-with-code-splitting\">reducing JavaScript payloads with code splitting<\/a> puts it, \u201cCode splitting is a technique that seeks to minimize startup time.\u201d Modern bundlers split automatically wherever your code uses a dynamic import:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Before: the size guide code ships with every product page\nimport { openSizeGuide } from '.\/size-guide.js';\n\n\/\/ After: it downloads only when someone taps the button\nbutton.addEventListener('click', async () =&gt; {\n  const { openSizeGuide } = await import('.\/size-guide.js');\n  openSizeGuide();\n});<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Frameworks build this in. Next.js and Nuxt split by page, so check that shared layouts and the custom app file do not import heavy components every page then carries; Target\u2019s largest unused file was its Next.js <code>_app<\/code> bundle, the one that wraps every page. In React, Google\u2019s audit page suggests that if you are not rendering on the server, you split bundles with <code>React.lazy()<\/code>; Next.js offers <code>next\/dynamic<\/code> for the same job. Vue and Angular support lazy routes in their routers.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Import less<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Tree shaking is the bundler\u2019s ability to leave out exports you never import. It only works when the library is written as ES modules and you import named functions, so <code>import { debounce } from 'lodash-es'<\/code> beats <code>import _ from 'lodash'<\/code>. Check the bundle analyzer for libraries that appear once and weigh a lot, and replace them with a small function or a browser feature where you can: native date formatting, <code>fetch<\/code> and CSS animations cover much of what older libraries were added for.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Delay or drop other companies\u2019 tags<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For ads, analytics, session recording, A\/B testing and chat, the question is less how to trim the code than whether each tag needs to load first. Make a list of every tag in your tag manager with its owner and the last time anyone used its data. Remove the ones nobody can name. Restrict the rest to the pages that need them, and fire them after the page has loaded or on the first interaction rather than at the top of the page. A chat widget can be a plain button that loads the real widget only when tapped. These changes need agreement from marketing as much as code from developers, so bring the Lighthouse list with you: it names each file and its cost.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Load scripts without blocking<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Scripts that must stay should not hold up the first screen. Add <code>defer<\/code> to scripts in the <code>head<\/code> so the browser downloads them in parallel and runs them after reading the HTML, or <code>async<\/code> for independent tags. That does not reduce unused JavaScript, but it removes scripts from Lighthouse\u2019s related warning, Eliminate render-blocking resources, and lets the main content appear sooner:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;script src=\"\/js\/app.js\" defer&gt;&lt;\/script&gt;\n&lt;script src=\"https:\/\/example-analytics.com\/tag.js\" async&gt;&lt;\/script&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">On WordPress and Shopify<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Google\u2019s audit page advises WordPress owners to consider \u201creducing, or switching, the number of WordPress plugins loading unused JavaScript in your page.\u201d Deactivate plugins you no longer use, then use a performance plugin\u2019s script manager to stop the rest loading on pages that do not need them, such as a form plugin outside the contact page. On Shopify, uninstalling an app does not always remove its code from the theme, so search the theme files for leftover snippets after removing one.<\/p>\n\n\n\n<aside class=\"uxa-check is-callout\" data-uxa-check=\"callout\"><p class=\"uxa-check__text\"><strong>Fixed it? Measure the page again<\/strong> UX Robot\u2019s free check runs Lighthouse on a phone and shows the scripts slowing your page, in about a minute.<\/p><a class=\"uxa-check__link\" href=\"\/?utm_source=blog&#038;utm_medium=guide&#038;utm_campaign=speed&#038;utm_content=reduce-unused-javascript&#038;utm_term=callout\">Check my page<\/a><\/aside>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"related-warnings\">Related warnings: main-thread work and render-blocking resources<\/h2>\n\n\n\n<p class=\"uxa-gd-answer wp-block-paragraph\">Unused JavaScript usually appears with three other warnings: Minimize main-thread work, Reduce JavaScript execution time and Eliminate render-blocking resources. They describe the same scripts from different angles, so one round of fixes often clears several.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Minimize main-thread work<\/strong> adds up everything the browser did on its main thread while loading: running scripts, working out styles, laying out the page and painting it. On Target\u2019s home page it came to 15.8 seconds, and on Wayfair\u2019s to 11.8 seconds. <strong>Reduce JavaScript execution time<\/strong> is the scripting part of that, 11.5 and 8.3 seconds, with the files that took longest. Here the first file was not always the one with the most unused bytes: on Target, a script from client.px-cloud.net led the list, and on Wayfair, a chunk of its own build. Sending less JavaScript is the most direct way to bring both down, followed by breaking long tasks into smaller ones so the page can answer taps in between.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Eliminate render-blocking resources<\/strong>, now called Render-blocking requests, lists the stylesheets and scripts the browser must fetch before it shows anything. On both home pages the list was stylesheets, with an estimated 2,180 milliseconds of savings on Target and 1,170 on Wayfair. For scripts, <code>defer<\/code> and <code>async<\/code> fix it; for CSS, put the styles the first screen needs in the page and load the rest without blocking.<\/p>\n\n\n\n<div class=\"uxa-gd-checklist-group\">\n    <h3>Before you change anything<\/h3>\n    <ul class=\"uxa-gd-checklist\">\n        <li>You have run Lighthouse on a phone setting for home, category, product and checkout pages.<\/li>\n        <li>You have the list of files with unused bytes, and an owner for each.<\/li>\n        <li>You have recorded the page in Coverage while using its menus, search and forms.<\/li>\n        <li>You know which tags marketing, analytics and support still use.<\/li>\n    <\/ul>\n<\/div>\n<div class=\"uxa-gd-checklist-group\">\n    <h3>After the fix<\/h3>\n    <ul class=\"uxa-gd-checklist\">\n        <li>Lighthouse lists fewer files, or smaller savings, under Reduce unused JavaScript.<\/li>\n        <li>Total Blocking Time and Largest Contentful Paint went down across several runs.<\/li>\n        <li>Every feature you moved to load on demand still works on a slow connection.<\/li>\n        <li>Analytics and ads still record what the business relies on.<\/li>\n    <\/ul>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"check-the-fix\">How to check the fix worked for real visitors<\/h2>\n\n\n\n<p class=\"uxa-gd-answer wp-block-paragraph\">Run Lighthouse three to five times before and after, and compare the medians, because single runs vary. Then watch real-visitor data in the Chrome UX Report over the following four weeks, since that is what Google uses for page experience.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Lab tests such as Lighthouse load the page once, on a simulated phone and connection, so the numbers change from run to run, especially on pages full of ads that differ each time. Look for a clear drop in the estimated savings and in Total Blocking Time across several runs rather than one good score. The Chrome UX Report, shown at the top of PageSpeed Insights when your page has enough traffic, reports what real Chrome users experienced over the previous 28 days, including Interaction to Next Paint. Expect it to move gradually after a release.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check accessibility and search at the same time, because script changes can break them. A menu that now loads on demand must still open with the keyboard, and content that used to arrive by JavaScript must still be in the page for search engines. Our <a href=\"\/ux-audits\/guides\/website-audit-checklist\/\">website audit checklist<\/a> covers speed, accessibility and search together, and the <a href=\"\/ux-audits\/guides\/seo-audit-example\/\">SEO audit example<\/a> shows how speed findings sit beside search problems in a real report.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is where UX Robot helps. A <a href=\"\/documentation\/page-audits\">page audit<\/a>, like the two behind this guide, measures the page with Lighthouse and the Chrome UX Report and has your own AI agent check it in a real browser, then lists every speed problem with the files that cause it, its estimated saving and the fix, beside the page\u2019s accessibility, usability and search problems. The Free plan covers five page audits a month and Pro makes them unlimited. Enterprise audits whole journeys with your GA4, Search Console and Clarity data, sends issues to your tracker and reruns them on a schedule, so you can see the fix hold. Compare the <a href=\"\/pricing\">plans<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"reduce-unused-javascript-faq\">Questions about unused JavaScript<\/h2>\n\n\n\n<div class=\"uxa-gd-faq\">\n    <details>\n        <summary>Does unused JavaScript affect my PageSpeed score?<\/summary>\n        <p>Not directly. Only the metrics count toward the score, but the time unused scripts take to download and run makes Largest Contentful Paint and Total Blocking Time worse, and those two make up more than half of it.<\/p>\n    <\/details>\n    <details>\n        <summary>Can I just delete the unused code Lighthouse shows?<\/summary>\n        <p>Usually not. Lighthouse only sees one page load, so code that looks unused may run when someone opens a menu or reaches another page. Load it later or on the pages that need it instead, and test each feature afterwards.<\/p>\n    <\/details>\n    <details>\n        <summary>How do I reduce unused JavaScript from Google Tag Manager or Google Ads?<\/summary>\n        <p>You cannot change Google\u2019s own files, but you can choose which tags fire, on which pages and when. Remove old tags, limit the rest to the pages that need them, and use triggers that fire after the page has loaded.<\/p>\n    <\/details>\n    <details>\n        <summary>How do I remove unused JavaScript in WordPress?<\/summary>\n        <p>Deactivate plugins you do not use, then stop the remaining plugins loading their scripts on pages that do not need them, with a script manager in a performance plugin. Test forms, sliders and checkout after each change.<\/p>\n    <\/details>\n    <details>\n        <summary>Is unused CSS the same problem?<\/summary>\n        <p>It is a separate audit, Reduce unused CSS, with the same idea: styles the page does not use. Stylesheets block the first paint, so they delay the page even more directly than deferred scripts do.<\/p>\n    <\/details>\n    <details>\n        <summary>Where do the Target and Wayfair figures come from?<\/summary>\n        <p>From UX Robot page audits of each home page on a 390 by 844 pixel phone screen on November 26, 2026, with Lighthouse\u2019s mobile test run by UX Robot\u2019s server. They are one lab test each on a sales day, and the pages may have changed since.<\/p>\n    <\/details>\n<\/div>\n\n\n\n<div class=\"uxa-gd-sources\">\n    <p class=\"uxa-kicker\">Sources<\/p>\n    <ol>\n        <li><a href=\"https:\/\/developer.chrome.com\/docs\/lighthouse\/performance\/unused-javascript\/\">Reduce unused JavaScript<\/a>, Lighthouse documentation, Chrome for Developers.<\/li>\n        <li><a href=\"https:\/\/developer.chrome.com\/docs\/devtools\/coverage\">Find unused JavaScript and CSS with the Coverage panel<\/a>, Chrome DevTools documentation, Chrome for Developers.<\/li>\n        <li><a href=\"https:\/\/developer.chrome.com\/docs\/lighthouse\/performance\/performance-scoring\">Lighthouse performance scoring<\/a>, Chrome for Developers.<\/li>\n        <li><a href=\"https:\/\/web.dev\/articles\/reduce-javascript-payloads-with-code-splitting\">Reduce JavaScript payloads with code splitting<\/a>, web.dev.<\/li>\n        <li><a href=\"https:\/\/web.dev\/articles\/optimize-inp\">Optimize Interaction to Next Paint<\/a>, web.dev, updated September 2, 2025.<\/li>\n        <li><a href=\"https:\/\/almanac.httparchive.org\/en\/2024\/javascript\">JavaScript, Web Almanac 2024<\/a>, HTTP Archive, June 2024 crawl, updated January 16, 2026.<\/li>\n        <li>UX Robot page audits of <a href=\"https:\/\/www.target.com\/\">Target\u2019s home page<\/a> and <a href=\"https:\/\/www.wayfair.com\/\">Wayfair\u2019s home page<\/a>, mobile, November 26, 2026.<\/li>\n    <\/ol>\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>Reduce unused JavaScript explained: what the Lighthouse warning measures, how to find the files, and the fixes, with real numbers from Target and Wayfair.<\/p>\n","protected":false},"featured_media":558,"template":"","guide-topics":[23],"class_list":["post-560","guide","type-guide","status-publish","has-post-thumbnail","hentry","guide_topic-speed"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"Reduce unused JavaScript explained: what the Lighthouse warning measures, how to find the files, and the fixes, with real numbers from Target and Wayfair.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/uxrobot.ai\/ux-audits\/guides\/reduce-unused-javascript\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"UX Audits - Independent, evidence-led UX audits.\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Reduce unused JavaScript: what it means and how to fix it - UX Audits\" \/>\n\t\t<meta property=\"og:description\" content=\"Reduce unused JavaScript explained: what the Lighthouse warning measures, how to find the files, and the fixes, with real numbers from Target and Wayfair.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/uxrobot.ai\/ux-audits\/guides\/reduce-unused-javascript\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-11-26T19:29:33+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-11-26T19:29:33+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Reduce unused JavaScript: what it means and how to fix it - UX Audits\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Reduce unused JavaScript explained: what the Lighthouse warning measures, how to find the files, and the fixes, with real numbers from Target and Wayfair.\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/guides\\\/reduce-unused-javascript\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/guides\\\/#listItem\",\"name\":\"Guides\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/guides\\\/#listItem\",\"position\":2,\"name\":\"Guides\",\"item\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/guides\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/guides\\\/topic\\\/speed\\\/#listItem\",\"name\":\"Speed\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/guides\\\/topic\\\/speed\\\/#listItem\",\"position\":3,\"name\":\"Speed\",\"item\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/guides\\\/topic\\\/speed\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/guides\\\/reduce-unused-javascript\\\/#listItem\",\"name\":\"Reduce unused JavaScript: what it means and how to fix it\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/guides\\\/#listItem\",\"name\":\"Guides\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/guides\\\/reduce-unused-javascript\\\/#listItem\",\"position\":4,\"name\":\"Reduce unused JavaScript: what it means and how to fix it\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/guides\\\/topic\\\/speed\\\/#listItem\",\"name\":\"Speed\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/#organization\",\"name\":\"UX Audits\",\"description\":\"Independent, evidence-led UX audits.\",\"url\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/guides\\\/reduce-unused-javascript\\\/#webpage\",\"url\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/guides\\\/reduce-unused-javascript\\\/\",\"name\":\"Reduce unused JavaScript: what it means and how to fix it - UX Audits\",\"description\":\"Reduce unused JavaScript explained: what the Lighthouse warning measures, how to find the files, and the fixes, with real numbers from Target and Wayfair.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/guides\\\/reduce-unused-javascript\\\/#breadcrumblist\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/guide-reduce-unused-javascript-wayfair-home-page-phone.jpg\",\"@id\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/guides\\\/reduce-unused-javascript\\\/#mainImage\",\"width\":780,\"height\":1688,\"caption\":\"Wayfair's home page on a phone on November 26, 2026, with the search box, an orange Black Friday strip and a Sealy mattress offer of up to 60% off in the hero\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/guides\\\/reduce-unused-javascript\\\/#mainImage\"},\"datePublished\":\"2026-11-27T06:29:33+11:00\",\"dateModified\":\"2026-11-27T06:29:33+11:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/#website\",\"url\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/\",\"name\":\"UX Audits\",\"description\":\"Independent, evidence-led UX audits.\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/uxrobot.ai\\\/ux-audits\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Reduce unused JavaScript: what it means and how to fix it - UX Audits","description":"Reduce unused JavaScript explained: what the Lighthouse warning measures, how to find the files, and the fixes, with real numbers from Target and Wayfair.","canonical_url":"https:\/\/uxrobot.ai\/ux-audits\/guides\/reduce-unused-javascript\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/uxrobot.ai\/ux-audits\/guides\/reduce-unused-javascript\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/uxrobot.ai\/ux-audits\/#listItem","position":1,"name":"Home","item":"https:\/\/uxrobot.ai\/ux-audits\/","nextItem":{"@type":"ListItem","@id":"https:\/\/uxrobot.ai\/ux-audits\/guides\/#listItem","name":"Guides"}},{"@type":"ListItem","@id":"https:\/\/uxrobot.ai\/ux-audits\/guides\/#listItem","position":2,"name":"Guides","item":"https:\/\/uxrobot.ai\/ux-audits\/guides\/","nextItem":{"@type":"ListItem","@id":"https:\/\/uxrobot.ai\/ux-audits\/guides\/topic\/speed\/#listItem","name":"Speed"},"previousItem":{"@type":"ListItem","@id":"https:\/\/uxrobot.ai\/ux-audits\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/uxrobot.ai\/ux-audits\/guides\/topic\/speed\/#listItem","position":3,"name":"Speed","item":"https:\/\/uxrobot.ai\/ux-audits\/guides\/topic\/speed\/","nextItem":{"@type":"ListItem","@id":"https:\/\/uxrobot.ai\/ux-audits\/guides\/reduce-unused-javascript\/#listItem","name":"Reduce unused JavaScript: what it means and how to fix it"},"previousItem":{"@type":"ListItem","@id":"https:\/\/uxrobot.ai\/ux-audits\/guides\/#listItem","name":"Guides"}},{"@type":"ListItem","@id":"https:\/\/uxrobot.ai\/ux-audits\/guides\/reduce-unused-javascript\/#listItem","position":4,"name":"Reduce unused JavaScript: what it means and how to fix it","previousItem":{"@type":"ListItem","@id":"https:\/\/uxrobot.ai\/ux-audits\/guides\/topic\/speed\/#listItem","name":"Speed"}}]},{"@type":"Organization","@id":"https:\/\/uxrobot.ai\/ux-audits\/#organization","name":"UX Audits","description":"Independent, evidence-led UX audits.","url":"https:\/\/uxrobot.ai\/ux-audits\/"},{"@type":"WebPage","@id":"https:\/\/uxrobot.ai\/ux-audits\/guides\/reduce-unused-javascript\/#webpage","url":"https:\/\/uxrobot.ai\/ux-audits\/guides\/reduce-unused-javascript\/","name":"Reduce unused JavaScript: what it means and how to fix it - UX Audits","description":"Reduce unused JavaScript explained: what the Lighthouse warning measures, how to find the files, and the fixes, with real numbers from Target and Wayfair.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/uxrobot.ai\/ux-audits\/#website"},"breadcrumb":{"@id":"https:\/\/uxrobot.ai\/ux-audits\/guides\/reduce-unused-javascript\/#breadcrumblist"},"image":{"@type":"ImageObject","url":"https:\/\/uxrobot.ai\/ux-audits\/wp-content\/uploads\/2026\/11\/guide-reduce-unused-javascript-wayfair-home-page-phone.jpg","@id":"https:\/\/uxrobot.ai\/ux-audits\/guides\/reduce-unused-javascript\/#mainImage","width":780,"height":1688,"caption":"Wayfair's home page on a phone on November 26, 2026, with the search box, an orange Black Friday strip and a Sealy mattress offer of up to 60% off in the hero"},"primaryImageOfPage":{"@id":"https:\/\/uxrobot.ai\/ux-audits\/guides\/reduce-unused-javascript\/#mainImage"},"datePublished":"2026-11-27T06:29:33+11:00","dateModified":"2026-11-27T06:29:33+11:00"},{"@type":"WebSite","@id":"https:\/\/uxrobot.ai\/ux-audits\/#website","url":"https:\/\/uxrobot.ai\/ux-audits\/","name":"UX Audits","description":"Independent, evidence-led UX audits.","inLanguage":"en-US","publisher":{"@id":"https:\/\/uxrobot.ai\/ux-audits\/#organization"}}]},"og:locale":"en_US","og:site_name":"UX Audits - Independent, evidence-led UX audits.","og:type":"article","og:title":"Reduce unused JavaScript: what it means and how to fix it - UX Audits","og:description":"Reduce unused JavaScript explained: what the Lighthouse warning measures, how to find the files, and the fixes, with real numbers from Target and Wayfair.","og:url":"https:\/\/uxrobot.ai\/ux-audits\/guides\/reduce-unused-javascript\/","article:published_time":"2026-11-26T19:29:33+00:00","article:modified_time":"2026-11-26T19:29:33+00:00","twitter:card":"summary_large_image","twitter:title":"Reduce unused JavaScript: what it means and how to fix it - UX Audits","twitter:description":"Reduce unused JavaScript explained: what the Lighthouse warning measures, how to find the files, and the fixes, with real numbers from Target and Wayfair."},"aioseo_meta_data":{"post_id":"560","title":null,"description":null,"keywords":null,"keyphrases":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_image_url":null,"twitter_title":null,"twitter_description":null,"schema_type":"default","schema_type_options":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null,"created":"2026-11-26 20:11:46","updated":"2026-11-26 20:11:46"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/uxrobot.ai\/ux-audits\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/uxrobot.ai\/ux-audits\/guides\/\" title=\"Guides\">Guides<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/uxrobot.ai\/ux-audits\/guides\/topic\/speed\/\" title=\"Speed\">Speed<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tReduce unused JavaScript: what it means and how to fix it\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/uxrobot.ai\/ux-audits\/"},{"label":"Guides","link":"https:\/\/uxrobot.ai\/ux-audits\/guides\/"},{"label":"Speed","link":"https:\/\/uxrobot.ai\/ux-audits\/guides\/topic\/speed\/"},{"label":"Reduce unused JavaScript: what it means and how to fix it","link":"https:\/\/uxrobot.ai\/ux-audits\/guides\/reduce-unused-javascript\/"}],"_links":{"self":[{"href":"https:\/\/uxrobot.ai\/ux-audits\/wp-json\/wp\/v2\/guides\/560","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/uxrobot.ai\/ux-audits\/wp-json\/wp\/v2\/guides"}],"about":[{"href":"https:\/\/uxrobot.ai\/ux-audits\/wp-json\/wp\/v2\/types\/guide"}],"version-history":[{"count":1,"href":"https:\/\/uxrobot.ai\/ux-audits\/wp-json\/wp\/v2\/guides\/560\/revisions"}],"predecessor-version":[{"id":561,"href":"https:\/\/uxrobot.ai\/ux-audits\/wp-json\/wp\/v2\/guides\/560\/revisions\/561"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/uxrobot.ai\/ux-audits\/wp-json\/wp\/v2\/media\/558"}],"wp:attachment":[{"href":"https:\/\/uxrobot.ai\/ux-audits\/wp-json\/wp\/v2\/media?parent=560"}],"wp:term":[{"taxonomy":"guide_topic","embeddable":true,"href":"https:\/\/uxrobot.ai\/ux-audits\/wp-json\/wp\/v2\/guide-topics?post=560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}