PageSpeed watched the page open. It listed scripts the browser downloaded and barely ran. That is the whole warning. Here is how to read the list without breaking the page.
You already know the line. Reduce unused JavaScript. Under it, a stack of file addresses, and a size next to each one. The top file is the largest. It is easy to read that as “delete these.” That reading is how pages get broken.
The line is still worth taking seriously. A phone on a slow connection has to fetch every one of those files before it can get on with the picture, the words, and the button the person came for. Code that never runs is still a download.
What the line actually measured
PageSpeed Insights loads one address, in a lab, the way a first visit might look on a phone. While that load is happening it keeps a record of which script code actually ran. Code that was downloaded and did not run on that pass is marked unused.
That record stops when the page has settled. It does not sit there and use the site the way a person would. It does not open a menu, send a form, start a chat, or scroll to a map. Anything that waits for those moments can look unused and still be the reason the page works.
So “unused” here means “not run during this one load.” It does not mean “safe to throw away,” and it does not mean “this file is why the site feels slow.” It means the browser fetched code it did not need yet.
Why a file that never ran still costs the visit
The wait happens before the code runs. The phone has to ask for the file, receive it, and read it. A large script takes time on a weak connection even if most of the code sits idle after that. While that transfer is going on, the picture the person is waiting for is sharing the same connection.
This is why a chat box you never opened can still show up on the list, and why the page can feel late before anyone taps anything. The file arrived. The feature did not. The visitor paid for both.
A small unused file is rarely the story. PageSpeed puts the largest waste at the top for that reason. A tiny helper is not the same problem as a script hundreds of kilobytes long that came along for one button.
The three kinds of files on the list
Yours, and this page never needs it. A slider script on a page with no slider. A booking script on a page with no booking. A theme file that loads on every page because that was easier than deciding. These are the ones worth removing from this page. The rest of the site can keep them where they are actually used.
Yours, and a person needs it a moment later. The menu, the search box, the form, the gallery that opens on tap. PageSpeed did not tap. The file looks idle. Take it off the page and the first real visitor finds a dead control. If the file is huge, the useful question is whether that control can load when the person asks for it, not whether the control should disappear.
Someone else’s file. Ads, chat, a tag that loads other tags, a map, a review widget. The address is on their server. You cannot edit the file. You can take their tool off your page, or you can keep it because the tool is doing a job you want. Those are the only two honest choices. A speed plugin that claims to “fix unused JavaScript” often just delays these files. The download still happens. It happens a little later.
What to leave alone
Do not clear the list in one afternoon. I have watched people turn plugins off in a pile, run PageSpeed again, and treat whatever number comes back as proof. The score also moves when nothing changed. A real cut can look small on the grade, and a lucky second run can look like a victory. One file, then another look. I wrote about that wobble in Why your Lighthouse score changes when you did nothing.
Do not treat the homepage as the whole site. The homepage can be quiet while the page people actually use, a product, a booking form, a long post, pulls a much larger script. Test the address that felt slow.
And do not assume this line is the main wait. A huge picture, or a server that is slow to answer, can be what people feel while this list sits underneath it. On a WordPress site those show up together, because themes and plugins are happy to add scripts to every page. I wrote that up in What usually slows a WordPress site.
How to read one row
Take the top row only.
Read the address. If you recognise the name, a plugin, a theme, a tool you installed, you know who put it there. If the name is a hash of letters and you do not recognise it, it is often a file the site built, or a tag. The folder in the address usually gives it away: a plugin folder, a theme folder, or another company’s domain.
Then ask one question. Does this page need this file before anyone taps? If the answer is no, that file does not belong on this load. If the answer is yes, leave it and look at the next row. If the answer is “only after they tap,” the file can wait for the tap, but only if you can make that change without losing the control.
Chrome can show the same thing in more detail. Open the page, open the Coverage panel, and reload. It colours the code that ran and the code that did not. Use that when you already know the file and you want to see how much of it was idle. You do not need it to decide which row to open first. The top row is enough for that.
Where to start
Stay on the page that felt slow. Open the top file if it is yours. Leave the rest of the list until you know whether that file was the wait. If the top file belongs to a tool you do not care about, remove the tool, not five other plugins.
Then run the check again on the same address. Read the new score next to how far the score moves when you change nothing. If the file is gone from the list and the page still works when you use it, that was the right cut. If the score jumped and the page feels the same, you measured noise.
A free check on PafCore is that first look without the long list. Paste the public address. No account. You get the score, how far that score moves when nothing changed, the slow file when it can be named, and a few of the problems. Sign in for the full report, including what to try. PageSpeed remains a good snapshot of the warning. Use it for the list. Use a named file when the list is too long to trust.
Try it: Check my site. Paste a public address. Free check. No account.
Top comments (0)