Skip to main content

What it flags

A JSX <script src="..."> rendered inside <head>, the next/head component or the next/document Head component without async, defer or type="module". The browser stops parsing the HTML at a classic script in the head and paints nothing until the script has downloaded and run, so a slow third-party host delays every page load. Scripts at the end of <body>, next/script components, scripts whose type is not JavaScript (such as application/ld+json), noModule scripts (which browsers that support modules never load), scripts whose src is empty, null or undefined, elements with spread attributes and scripts whose async or defer is a computed value such as async={isProd} are not reported. Plain .html files are not read by the performance scan.

How to review or fix

Add defer when the script must run in document order after parsing, or async when it is independent. In Next.js, load third-party scripts with next/script and strategy="afterInteractive" or "lazyOnload". Keep a blocking script only when the page cannot render correctly before it runs, such as a theme or consent snippet that must apply before first paint, and prefer inlining such a small snippet.

Configuration

Set the rule to "off" in loadwise.config.json to drop its findings: