Fix guides · Performance

How to fix long critical request chains (network dependency tree)

When one file has to load before the browser even finds the next, every step adds a round trip. How to shorten those chains on Shopify, WordPress, Webflow, Wix, Squarespace and Next.js.

Time to fix
30–90 minutes
Skill needed
Developer
Who notices
Every visitor, most of all on slow mobile connections

Why it matters

Some files are only discovered after another has loaded: a stylesheet that @imports another stylesheet, which then asks for a font from a third server. Each link in that chain is another wait before the page can be drawn.

The report shows these as a tree. The longest branch, and anything fetched from a different server along the way, is where the time goes.

“A key caution applies to all resource hints: overuse is as harmful as underuse, because hints that compete with the browser's own prioritization can make pages slower.”

Shopify: Theme performance best practices

Before you start

  • There are three ways to shorten a chain: remove files from it, make them smaller, or let the browser find them sooner.
  • Common long chains: Google Fonts (a stylesheet from one server, then font files from another), CSS @import, and scripts that load more scripts.
  • Preconnect lets the browser open a connection to another server early. Use it for at most two or three servers that the first view really needs; more than that slows other downloads.

Fix it on your platform

Shopify

  1. Shopify already preloads render-blocking scripts and stylesheets with Early Hints, and serves its CDN files over HTTP/3.
  2. Self-host web fonts on Shopify's CDN instead of loading them from Google Fonts or another service. This removes a connection to another server.
  3. For a third-party server the first view really needs, add a preconnect hint in theme.liquid, above {{ content_for_header }}.
theme.liquid
<link rel="preconnect" href="https://widgets.example.com" crossorigin>

WordPress

  1. If your theme loads Google Fonts, look for a setting to host them locally, or use a plugin that does. This removes two servers from the chain.
  2. Avoid stylesheets that @import other stylesheets. Load each one with wp_enqueue_style instead, so the browser finds them all at once.
  3. Deactivate plugins whose scripts load further scripts on every page if you don't need them.

Webflow

  1. Webflow recommends downloading Google Fonts and uploading them as custom fonts, instead of loading them from Google. That removes a server from the chain.
  2. Remove third-party scripts in custom code or embeds that you no longer need; each one can start its own chain.

Wix

  1. Wix manages its own files. What you control is apps and custom code: each app and code snippet can add its own chain.
  2. Remove apps and custom code you don't need, and use fewer fonts.

Squarespace

  1. Squarespace manages its own files. What you control is fonts, code injection and embeds.
  2. Use fewer fonts (Squarespace loads every selected font, including Adobe Fonts, before the page appears), and remove code and embeds you don't need.

Next.js

  1. Load fonts with next/font. It self-hosts Google Fonts with your other files, so the browser makes no request to Google.
  2. Import CSS in your components or layout rather than with @import inside CSS files.
app/layout.tsx
import { Inter } from "next/font/google";

const inter = Inter({ subsets: ["latin"] });

Any other site

  1. Replace CSS @import with separate <link> tags, so the browser fetches them at the same time.
  2. Host fonts on your own domain, and preload the one or two files the first view needs.
  3. Preconnect to at most two or three other servers the first view really needs.
HTML
<link rel="preload" href="/fonts/brand.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preconnect" href="https://cdn.example.com" crossorigin>

Check that it's fixed

  • Re-run your StudioLNC audit: the longest chain in the network dependency tree should be shorter.
  • Check that fonts and widgets still load correctly on your key pages.

Find every issue like this on your site

Free audit of performance, accessibility, SEO and security, with fixes for your platform.