Skip to content

Files hold up the first view

Style sheets and scripts at the top of the page must download before anything appears, and some can only start once another has arrived.

Why it matters

Visitors see a blank screen while each file is in the way, and each file waiting for another adds another wait.

How to fix it

  1. Load scripts that the first view doesn’t need later, with defer or async, or only on the pages that use them.
  2. Remove style sheets and fonts the site no longer uses.
  3. Connect early to the outside servers the first view needs most, such as your font or image service, with preconnect.
On WordPress
  1. Install Jetpack Boost (on WordPress.com, a plan with plugins) and turn on Optimize CSS Loading and Defer Non-Essential JavaScript, then check the site still works.

WordPress help: Improve your website’s speed and performance (opens in a new tab)

On Shopify
  1. If the page stays blank, then appears all at once, find the slow scripts with your browser’s developer tools and ask the app’s or theme’s developer to fix them.

Shopify help: Improving your online store performance (opens in a new tab)

On Wix
  1. Go to Settings › Custom Code and, for scripts the first view doesn’t need, add defer and choose Body – end under Place Code in.

Wix help: Site Performance: Using Third Party Code on Your Site (opens in a new tab)

On Squarespace
  1. Open the Code Injection panel and move scripts the first view doesn’t need from the Header field to the Footer field, which adds them just before the closing </body> tag.

Squarespace help: Customize parts of your site with code injection (opens in a new tab)

On Hostinger
  1. Go to More (⋯) › Integrations, delete the code you don’t need from the Custom code field, save, then update the website: AI Builder sites have no files waiting on each other until outside tools add them.

Hostinger help: Hostinger AI Builder: Website speed (opens in a new tab)

On Webflow
  1. Move scripts from Head code to Footer code in Site settings › Custom code, or add defer to them, unless a script’s instructions say it must stay in the head.
  2. On a paid plan, turn on Site settings › Publishing › Advanced publishing options › Asynchronously load JavaScript, publish, then check your own scripts still work.

Webflow help: Optimize custom scripts (opens in a new tab)

In code (HTML, CSS or Tailwind)
  1. Add defer to scripts in the head (unless code on the page needs them straight away), and a preconnect link for the most important outside server.
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <script src="/app.js" defer></script>

MDN: <script>: the script element (opens in a new tab)

Check your fix

Once the change is live, check the page again.

Want it done for you?

We’re a product design studio. We can make this fix, and check the rest of your site while we’re at it.

Book a call (opens in a new tab)