Guides · Speed
How to stop files holding up your page
A browser reads your page from the top. When it finds a stylesheet or an ordinary script near the top, it usually waits for that file before it shows anything. Visitors look at a blank screen during that wait.
Your report may also mention files that are larger than they need to be. They take longer to download, so the same fixes often help.
What your report means
These findings come from Google's speed test, and each one shows a saving estimated from one test. Use that number to choose where to start. To see the file names, run the same page at pagespeed.web.dev, Google's free test.
- "Some files hold up the first view" means the browser waited for scripts or stylesheets before showing the page.
- "The page loads styling it does not use" and "The page loads scripts it does not use" mean the page did not run some of its code during the test.
- "Larger than they need to be" means the files still contain spaces and comments that browsers do not need. Removing them is called minifying.
The test sees one load of one page. Code it calls unused may run on another page or after a click, so check before you delete it.
How to fix it
- Remove plugins, apps, widgets and tracking code you no longer use. This is the safest fix.
- Load the remaining scripts only on the pages that need them.
- Postpone scripts that are not needed for the first view.
- Turn on minifying.
- Check menus, forms, carts and checkout after each change. A postponed script can break a feature that depends on it.
What to do on your platform
On WordPress, many cache and speed plugins can minify files and postpone scripts. Change one setting at a time and test. Deactivate plugins you do not need, because each one may add its own files. Yoast and Rank Math are SEO plugins and do not offer these settings.
On Shopify, start with your apps and theme. Remove apps you no longer use. An app may leave code in your theme after you uninstall it, so ask the app's support or a developer to check. Editing how the theme loads files is a developer job.
On Wix and Squarespace, the platform controls how its own files load, and you usually cannot change that. You can remove apps, embeds and custom code you added. If Google's test names only the platform's own files, spend your time on other findings.
What to ask a developer
Send them the file names from Google's test and ask for three things:
- Add
deferorasyncto scripts that can wait, for example<script src="app.js" defer></script>. A deferred script runs after the page is read, in order. An async script runs as soon as it arrives, so it suits independent scripts. - Put the small amount of CSS needed for the first view directly in the page, and load the rest later.
- Remove unused CSS and JavaScript, and minify what remains in the build step.
How to check
Open your site on a phone and try the features you changed. Then press Rescan on your report. Estimated savings vary between tests, so look for a smaller saving or a finding that has gone.