Docket / Fix it / render-blocking resources

How to fix render-blocking resources

A render-blocking resource is a stylesheet or a script in the head that the browser must download and read before it can paint anything. The fix is two moves. Add defer to the scripts the first screen does not need, and load the stylesheets the first screen does not need after it. Keep what the first screen needs, and nothing else, in the way.

What counts as blocking

Two things stop the first paint.

Inline <style> blocks make no request, so they are not part of this. Putting the few rules the first screen needs inline is a normal way to keep one file off the critical path.

Scripts: add defer

defer downloads the file while the page is read and runs it after the page is parsed, in the order written. That is the right choice for most scripts, including the ones that depend on each other.

<script src="/js/app.js" defer></script>

async runs the file as soon as it arrives, in no promised order. Use it only for a script that depends on nothing and that nothing depends on, such as a stats snippet. When in doubt, use defer.

Stylesheets: keep one, load the rest late

Work out which stylesheet draws the first screen: the layout, the type, the header. That one stays as a normal link. The others (a theme for a page you are not on, a widget library, a print sheet) can wait.

<link rel="stylesheet" href="/css/layout.css">
<link rel="stylesheet" href="/css/widgets.css" media="print" onload="this.media='all'">
<noscript><link rel="stylesheet" href="/css/widgets.css"></noscript>

A media="print" stylesheet does not block, because it is not needed for the screen. The onload switches it to every medium once it has arrived. The noscript line is for a visitor with scripts off, who would otherwise never get that file. If you can, merge small files into the one you keep. Fewer files is fewer requests, even over HTTP/2.

A real before and after

I wrote a small fixture site for this page: a typewriter repair workshop, a few pages, four stylesheets and three scripts in the head. I audited it with Docket on 10 October 2026, changed the head, and audited it again. The pages are ours; nothing here is measured on anyone else's site.

Before: all four stylesheets and all three scripts were plain. Docket reported this, in its own words:

3 pages load 5+ render-blocking files
Worst: 7 blocking stylesheets/scripts on the page measured.

The fix it printed was: Add defer to scripts that are not needed for first paint, load non-critical CSS with media="print" onload, and merge the small files that remain. The head after I followed it:

<link rel="stylesheet" href="/css/layout.css">
<link rel="stylesheet" href="/css/reset.css" media="print" onload="this.media='all'">
<link rel="stylesheet" href="/css/theme.css" media="print" onload="this.media='all'">
<link rel="stylesheet" href="/css/widgets.css" media="print" onload="this.media='all'">
<script src="/js/vendor.js" defer></script>
<script src="/js/app.js" defer></script>
<script src="/js/analytics.js" defer></script>

That left 1 blocking file on each page, down from 7, and Docket stopped reporting the page. Nothing visible changed, because the stylesheets I moved were not needed for the first screen. Whether a stylesheet is needed for the first screen is the one judgement here, and a crawler cannot make it for you.

What Docket counts, and what it cannot see

The check counts the blocking files on each page it crawled and reports the pages with five or more. It reads the markup, as a browser's first pass would.

When it is not worth doing

A page with two blocking files has little to gain, and the check stays quiet below five for that reason. If the finding names a handful of pages on a large site, fix the shared template first, since one change in the head fixes all of them. A slow server is a different cause, covered in how to reduce server response time and how to fix compression and caching, and images that push the page around are covered in how to fix layout shift.

$349once · or 4 × $87.25

For Macs with Apple silicon or Intel, macOS 12 or later

Founding price $174.50 once · or 4 × $43.63, first 25 buyers, then $349. Buy applies the code FOUNDINGDOCKET for you; if the checkout shows $349, enter it under ‘Have a discount code?’.

Screaming Frog is $279 a year. Ahrefs plans with Site Audit run $29–$449 a month. Docket is $349 once. Their prices read 8 October 2026.

30 days, no conditions, no questions asked. Refund policy

Common questions

What does render-blocking mean?

The browser has to download and read the file before it can paint anything. A plain script in the head and a stylesheet with no media restriction both do that.

Should I use defer or async?

Use defer for most scripts. It runs them after the page is read, in the order written. Use async only for a script that depends on nothing and that nothing depends on.

Will loading CSS with media=print and onload break my page without JavaScript?

It can, so add a noscript link to the same file. Visitors with scripts off then get the stylesheet normally.

Does Docket measure Largest Contentful Paint?

No. It counts the blocking files in the markup of every page it crawls. The measured value for a page comes from PageSpeed Insights or Search Console.