Why the browser waits before painting anything
A browser can't paint a page the moment the HTML starts arriving. It first has to know how things should look, so it waits for every stylesheet referenced in the head, and it has to run every ordinary script it meets, because a script might change the page (the old document.write problem). Those files are render-blocking: until each one has been downloaded, and for scripts executed, the visitor stares at a blank screen. The time spent there feeds straight into First Contentful Paint (FCP) and usually into Largest Contentful Paint (LCP), the Core Web Vital Google measures from real Chrome users.
This detector fetches your page's HTML exactly as the server sends it and classifies every external stylesheet, script and CSS @import using the same rules browsers apply. It then requests each file to find its real transfer size, adds up how many kilobytes have to arrive before first paint, and gives a specific fix for every blocker, including copy-ready code.
How each stylesheet and script is classified
Stylesheets
A <link rel="stylesheet"> in the head blocks rendering unless its media query can't match the current screen. media="print" doesn't block on screens, so the browser downloads it at low priority. Queries such as (min-width: 1024px) still block on the screens where they match, and because they may match, we label them as blocking with a note. Stylesheets placed in the body block the rendering of content after them rather than the first paint, so we show them as "parser-blocking."
Scripts
A <script src> with no attributes in the head stops HTML parsing while it downloads and runs. defer downloads in parallel and runs after parsing, in document order. async downloads in parallel and runs as soon as it arrives, in any order. Scripts with type="module" are deferred by default. A plain script in the body doesn't delay the first paint, but it pauses everything below it until it has loaded, so we flag it separately.
@import inside CSS
An @import in an inline style block or stylesheet is discovered only after the parent CSS has been parsed, so it adds a full extra round trip to the critical path. Browsers' preload scanners can't see it early. It's one of the cheapest blockers to remove.
Four ways to unblock the first paint
1. Defer your scripts
For almost every first-party script, defer is the correct default. It preserves execution order, so a script that needs jQuery still runs after jQuery, and the DOM is ready when it runs. Use async for independent scripts such as analytics, where order doesn't matter.
<!-- Before: blocks parsing and paint --> <script src="/js/app.js"></script> <!-- After --> <script src="/js/app.js" defer></script> <script src="https://www.googletagmanager.com/gtag/js?id=G-XXXX" async></script>
If inline scripts later in the page call functions from a script you defer, they will break, because inline scripts can't be deferred. Move that inline code into a deferred file, or wrap it in a DOMContentLoaded listener.
2. Inline critical CSS, load the rest without blocking
Stylesheets block by design, and your main CSS should arrive quickly rather than be hidden, or visitors see a flash of unstyled content. The professional approach is "critical CSS": inline the small set of rules needed for the content visible without scrolling (often 10 to 20 KB), then load the full stylesheet in a way that doesn't block. Tools such as Critical, Penthouse, or the built-in features of many frameworks generate this automatically.
<style>/* critical, above-the-fold rules */</style>
<link rel="preload" href="/css/site.css" as="style"
onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="/css/site.css"></noscript>For small sites with one modest stylesheet (under roughly 30 KB compressed), it's often fine to leave it blocking. Focus on making it small, compressed, cached and served from your own domain. Several tiny stylesheets are worse than one combined file, which is why we warn when more than three block the paint.
3. Load fonts without blocking
Google Fonts and Adobe Fonts stylesheets live on another domain, so before downloading anything the browser must do a DNS lookup, TCP connection and TLS handshake. Preconnect early, and make sure the CSS uses font-display: swap (add &display=swap to Google Fonts URLs) so text appears in a fallback font immediately. Self-hosting fonts removes the extra connection entirely. The Font Loading Analyzer checks all of this for every font on the page.
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap">4. Split print and conditional styles
Print styles bundled into the main file add weight to every page view. Move them into a separate file with media="print" and they stop blocking. The same trick works for very large desktop-only layouts.
Deferring scripts on WordPress, Shopify, frameworks and Cloudflare
WordPress
Themes and plugins enqueue scripts through wp_enqueue_script. Since WordPress 6.3 you can request a loading strategy directly, which is the cleanest fix for your own code. For plugins you don't control, performance plugins (WP Rocket, Perfmatters, Autoptimize, LiteSpeed Cache, FlyingPress) have "defer JavaScript" and "remove unused CSS / critical CSS" options. Test after enabling them; some sliders and page builders break when deferred and need excluding.
wp_enqueue_script( 'my-theme-app', get_template_directory_uri() . '/js/app.js', array(), '1.0', array( 'strategy' => 'defer', 'in_footer' => true ) );
Shopify
In your theme's theme.liquid, add defer to theme script tags. Shopify's script_tag filter outputs a blocking script, so replace it with an explicit tag. Apps inject their own scripts; uninstalled apps sometimes leave snippets behind, so remove leftover app code from your theme.
<!-- instead of {{ 'theme.js' | asset_url | script_tag }} -->
<script src="{{ 'theme.js' | asset_url }}" defer></script>Next.js, Nuxt and other frameworks
Framework bundles are already deferred or loaded as modules. Blockers usually come from third-party tags added by hand. In Next.js, use the next/script component with strategy="afterInteractive" or "lazyOnload" instead of a raw script tag.
Cloudflare
Cloudflare's Rocket Loader rewrites scripts to load asynchronously without code changes. It can help on legacy sites but occasionally breaks scripts that depend on load order, so treat it as a last resort after adding defer yourself.
Connections, kilobytes and the real cost of a blocker
Size is only half the cost. Each blocking file from a new domain needs its own connection setup, which on a mobile network with 150 ms latency is three round trips, close to half a second, before a single byte downloads. Files from your own domain reuse the existing connection (especially over HTTP/2), so they mostly cost transfer time. That's why the tool highlights third-party blockers without a preconnect hint: they're often slower than their size suggests.
As a rough guide on a mid-range phone, 100 KB of compressed blocking CSS and JavaScript adds around half a second to first paint, and JavaScript also has to be parsed and executed, which can take longer than the download itself. A page with one 25 KB stylesheet and no blocking scripts typically paints within a second of the HTML arriving; a page with 300 KB of blocking files across five domains can take three or more.
Resource hints: preload, preconnect and fetchpriority
These hints don't remove blocking, but they make the browser start important downloads sooner. preconnect opens a connection to a host you'll definitely use. preload fetches a specific file early, which is useful for a font or hero image the browser would otherwise discover late. Use them sparingly: preloading ten files makes them compete with each other and with your CSS. For the LCP image, fetchpriority="high" on the image tag is usually better than a preload.
<link rel="preconnect" href="https://cdn.example.com" crossorigin> <link rel="preload" href="/fonts/inter-var.woff2" as="font" type="font/woff2" crossorigin> <img src="/hero.avif" fetchpriority="high" width="1200" height="600" alt="...">
What a raw-HTML check cannot see
This tool reads the HTML as served, before JavaScript runs. Scripts injected later by a tag manager don't block the first paint (they're inserted asynchronously), but they still compete for bandwidth and main-thread time, so check them with a full Lighthouse report. We size up to 20 files per page; if a file blocks our requests, its size shows as unknown. Finally, a file can be technically non-blocking and still slow your LCP, for example a hero image discovered late because it's set in CSS. That's what the Lighthouse report's LCP diagnostics are for.
The order of work that pays off most: defer head scripts, remove @import chains, preconnect to font and CDN hosts, combine tiny stylesheets, and then consider critical CSS. Re-run this detector after each change and watch the "block first paint" count fall. Ideally only one compact, compressed, cached stylesheet remains. Then confirm the gain in the Page Speed Test, and see our page speed guide for the fixes that come next.