Your page sits blank while scripts and stylesheets download, and that hurts. To eliminate render blocking resources, inline the critical code, defer the rest with async or defer, and delete whatever your page never uses.
This guide is part of our wider web performance optimization coverage, so read it alongside the other fixes there.
| Item | Value |
|---|---|
| Types of URL Lighthouse flags | Two: scripts and stylesheets |
| Script is flagged when | It sits in the head with no defer and no async attribute |
| Stylesheet with media=”all” | Considered render-blocking |
| Unused CSS suggestion threshold | At least 2048 bytes of unused CSS rules |
| Audit moved into the Render-blocking requests insight | As of Lighthouse 13 |
The figures come from the Lighthouse documentation and the web.dev guide to deferring non-critical CSS. They can change, so check the source before you rely on them.
What counts as a render-blocking resource?
Lighthouse flags two types of URL that hold up the first paint: scripts and stylesheets. Its documentation lists the exact conditions, as shown on the Chrome for Developers page.
A script is flagged when it:
- sits in the head of the document,
- has no defer attribute, and
- has no async attribute.
A stylesheet link is flagged when it has no disabled attribute and no media attribute that matches the user’s device specifically. A link with media=”all” is still treated as render-blocking.
The reason is simple. CSS files are render-blocking resources, because they must be loaded and processed before the browser renders the page. Scripts are parser blocking by default unless marked async, according to the PageSpeed rules guide.
One housekeeping note: the Chrome documentation page, last updated 2019-05-02 UTC, warns that this audit has moved into the Render-blocking requests insight as of Lighthouse 13. The fixes below still apply to whatever report you read.
Find the critical code first
Before you move anything, decide what the first paint really needs. The Lighthouse docs suggest the Coverage tab in Chrome DevTools, which shows how much code was used compared with how much was loaded.
The web.dev walkthrough gives these steps:
- Open the DevTools Command Menu with Control+Shift+P (Command+Shift+P on a Mac).
- Type “Coverage” and select Show Coverage.
- Click Reload to start capturing coverage.
- Double-click the report to see the details for each file.
Green marks critical code: styles required for first paint, and code the page’s core functionality needs. Red marks non-critical code, such as styles for content that is not immediately visible.
Fix render-blocking scripts
Once critical code is identified, the Lighthouse guidance is to move it from the blocking URL into an inline script in your HTML page. The page then has what it needs for core functionality as soon as it loads.
Work through the rest of the scripts in this order:
- Keep non-critical code in its file and mark the script with async or defer.
- Remove code that is not used at all.
- Postpone initialization logic that the first render does not need.
The PageSpeed guide explains why async helps: it unblocks the document parser, so the browser does not wait on the CSSOM before running the script. It also notes that a script suited to async is often not essential for the first render anyway.
Fix render-blocking stylesheets
The stylesheet fix follows the same logic. Put the critical styles for the first paint in a style block at the head of the HTML page, then load the remaining styles asynchronously with the preload link.
Three further options reduce the weight of what is left:
- Automate the extraction of above-the-fold CSS with the Critical tool.
- Split styles into files by media query and add a media attribute to each link, so the browser blocks the first paint only for stylesheets that match the user’s device.
- Minify the CSS to strip extra whitespace and characters, so the bundle you send is as small as possible.

Avoid CSS imports too. The PageSpeed guide says imported files are discovered only after the stylesheet containing the rule has been received and parsed, which adds round trips to the critical path.
Inlining critical CSS removes those extra trips and can leave the HTML as the only blocking resource, per the same guide. Be careful, though: web.dev calls deferring non-critical CSS an advanced technique that can lead to bugs if not implemented properly, and says most sites can reach their targets without it. If Lighthouse reports at least 2048 bytes of unused CSS rules, the same web.dev guide says it also shows a Remove Unused CSS suggestion.
Shortcuts for CMS sites and related work
You do not always have to edit templates by hand. The Lighthouse documentation says there are a number of WordPress plugins that can help you inline critical assets or defer less important resources, and it makes the same point for Joomla. For Drupal, it suggests a module to inline critical CSS and JavaScript, plus the defer attribute for non-critical files, as listed in the Lighthouse docs.
Render-blocking code is only one part of a slow first load. Our guide to lazy loading images covers a different delay, and the explainer on what is a cdn covers how files reach your visitors.
Frequently asked questions
Should I inline all of my CSS?
Show answer
No. Inline only the styles the first paint needs, which the Coverage report shows in green, and load the remainder without blocking.
Does Lighthouse still list this as a separate audit?
Show answer
Per the Chrome documentation, last updated 2019-05-02 UTC, the audit has moved into the Render-blocking requests insight as of Lighthouse 13. Look for that insight in newer reports.
Is it risky to defer CSS?
Show answer
It can be. The web.dev guide flags it as an advanced technique, so test the page after the change and confirm nothing visible loses its styling.
How do I tell which scripts are safe to defer?
Show answer
Check whether the page’s core functionality depends on them at first paint. Code that is not part of that core is a candidate for async or defer, and code that never runs can be deleted.



