Trakis

Trakis · Rules

Too many blocking resources in the head

More than 4 render-blocking stylesheets or scripts in the <head>, a line this check sets. Print and disabled stylesheets, and async, defer, module and nomodule scripts, do not block and are not counted. The browser shows nothing until each blocking stylesheet has arrived and each blocking script has run. On a phone, every extra file is a visible delay before the first paint.

NoticePERF-002 · Performance · checked on every page

Render-blocking resources: what blocks the first paint, and the fix

Updated 18 October 2026.

Before a browser draws anything, it reads the page’s <head>. Some of what it finds there it must finish first: a stylesheet has to arrive, a plain script has to download and run. Those are render-blocking resources, and every one of them is time on a blank screen. This check counts them.

What blocks, and what does not (Lighthouse, MDN):

  • A stylesheet blocks, unless it is disabled or its media attribute leaves the device out. media="all" still blocks; media="print" does not.
  • A script in the head blocks, unless it has defer (run after the page is parsed) or async (run when it arrives).
  • type="module" scripts are deferred by default, and browsers that run modules ignore nomodule scripts, which are fallbacks for old ones.
  • Strictly, MDN notes, a plain script blocks parsing rather than drawing; in the head, before anything of the page has been read, the effect on the screen is the same.

How to clear them, Lighthouse’s three moves: inline what the first paint needs, defer the rest, remove what is unused.

<!-- the styles the first screen needs, in the page -->
<style>header{…} .hero{…}</style>

<!-- the rest without blocking: loaded as print, switched on when it arrives -->
<link rel="stylesheet" href="/site.css" media="print" onload="this.media='all'">

<!-- scripts after the page is parsed -->
<script src="/menu.js" defer></script>
<script src="/app.js" type="module"></script>
  • Scripts: add defer to anything that does not have to run before the page shows, which is nearly everything; analytics and widgets can take async.
  • Stylesheets for other media: give them a media attribute (print, (min-width: 1024px)), so the browser only waits for the ones that apply.
  • Plugins: on a CMS, every plugin tends to add its own file to every page; one that is used on a single page should load on that page only.
  • Fonts: a font stylesheet from another host is one more connection before the first paint. Hosting the font yourself removes it.

Ours, as it is. trakis.io’s rules index, read on 18 October 2026 after that evening’s deploy, has this in its head:

<link rel="stylesheet" href="/_next/static/css/….css">
<link rel="preload" href="/_next/static/media/….p.woff2" as="font" crossorigin>   ×2
<script src="/_next/static/chunks/polyfills-….js" noModule></script>
<script defer src="/_static/after-paint.….js"
        data-next="/_static/rules.….js /_next/static/chunks/….js … /_next/static/chunks/webpack-….js"></script>

One blocking request: the site’s own stylesheet. The fonts are hosted with the site, through next/font: their @font-face rules are in that stylesheet, the files come from our own host, and the two the first screen is set in are preloaded. Until 17 October they came from Google Fonts, a second host the browser had to reach first. Next.js’s scripts are no longer in the page at all: one small deferred script of ours asks for them once the page has been drawn, in the order they have to run, the page’s data first and Next’s runtime last. The polyfills are noModule, ignored by every current browser. Until 17 October 2026 this check counted those polyfills as blocking, on sites built with Next.js like ours.

PageSpeed, mobile lab test, the same page. Before the first deploy (17 October 2026): LCP 2,963 ms, and three render-blocking requests, the stylesheet, Google Fonts’ and the data script, 810 ms of estimated savings. The data script was in the body, where this check does not look; PageSpeed counted it. After that deploy, which hosted the fonts and deferred the data script: LCP 2,634 ms, FCP 1,968 ms, CLS 0, and one, the stylesheet, 150 ms.

Nothing blocked any more, and the page was still slow to draw: in the head, async and deferred, Next.js’s scripts arrived while Chrome waited for the fonts, and PageSpeed counted them in the time to the main content (PERF-003 has how). After the second deploy, on 18 October, which has the page ask for them only once it has been drawn: LCP 1,558 ms, between 1,513 and 2,156 ms over seven runs, CLS 0, and the same one blocking request, the stylesheet, 110 to 160 ms. A script that does not block can still be in the way.

The demo shop has one stylesheet and no scripts in its head: one blocking request, nothing to fix.

Check it yourself. PageSpeed Insights lists them under “Render-blocking requests”, with what each one costs. In the page source, look in <head> for <link rel="stylesheet" and <script src without defer, async or type="module".

How the audit decides.

  • In each page’s <head> it counts stylesheets that are not disabled and not for print or speech, and scripts with a src that have no async, defer or nomodule and are JavaScript but not modules.
  • More than 4 in all is PERF-002, a notice, with the two counts as the evidence. The line is ours: Lighthouse lists every blocking request and estimates what it costs, which a count of files cannot.
  • A stylesheet for a screen size, (min-width: 1024px), still counts: on a computer it blocks.
  • It reads the HTML only, so it cannot see how big each file is or how long it took; PageSpeed can. How long the main content took to appear is PERF-003.

Sources, read on 18 October 2026: Chrome for Developers, Eliminate render-blocking resources (Lighthouse) · MDN Web Docs, <script>: The Script element.

How common it is

In our study of 330 small sites, read from Common Crawl’s October 2026 archive (up to 100 pages a site), 60.0% of them had this problem on one page or more.

Where it usually comes from

Themes and plugins that each add their own stylesheet and script to the head, loaded on every page whether they are used there or not.

How to fix it

  • Add defer to scripts that do not need to run before the page shows; a type="module" script is deferred already.
  • Put the styles the first screen needs inline, in a <style> block, and load the rest without blocking.
  • Give stylesheets for other media a media attribute (print, a min-width), so the browser only waits for the ones that apply.

How to check it yourself

Run the page through PageSpeed Insights; its “Render-blocking requests” insight lists them by name, with the time each one costs.

What it looks like in a report

Notice 7 blocking resources in <head> delay the first paint. · evidence: 5 stylesheets, 2 scripts

Plugins each add their own files to every page; deferring the scripts is usually the quickest gain. (An example shop; the numbers are illustrative.)

How the audit counts it

PERF-002 is a notice in the performance category, and weighs lightly in that category’s score. When it appears on many pages built from the same template, the report shows it once, with the number of pages it covers — because one change in the template fixes all of them.

If the finding is deliberate on your site, it can be accepted as intentional in the report. It then leaves the list and the score, and comes back on its own if what it shows changes.

Other performance checks

Find it on your site

A free Trakis audit runs this check and the other 66 on your site, and tells you on how many pages each one sits. Or go back to all the rules.