Eliminate Render-Blocking Resources
Eliminate Render-Blocking Resources is a Lighthouse performance audit that flags CSS and JavaScript files loaded in the critical rendering path that block the browser from painting page content quickly. This delay negatively impacts First Contentful Paint (FCP) and Largest Contentful Paint (LCP), directly influencing user perception and Core Web Vitals scores.
What it Measures
When Lighthouse runs a performance test, it checks for external stylesheets, fonts and scripts in the document’s <head> that prevent the browser from rendering content until they are downloaded, parsed, and executed. These resources are called “render-blocking” because:
- CSS is render-blocking by default — the browser must fully load and parse all linked CSS before painting any part of the page.
- JavaScript placed in the head without async or defer attributes pauses HTML parsing until the script is fetched and executed.
- Fonts or imports triggered by CSS may also block rendering until available.
Why it Matters (UX / SEO Impact)
Eliminating render-blocking resources significantly improves the speed at which meaningful content is visible to the user. Faster initial rendering means:
- Better UX: Users can see and interact with the page sooner, reducing perceived wait times.
- Higher Core Web Vitals scores: Directly improves FCP and LCP.
- Improved SEO: Google factors page speed into rankings, and render-blocking elements can harm performance scores.
- Lower bounce rates: Visitors are less likely to abandon slow-loading pages.
Relation to Other Web Vitals
Render-blocking resources primarily affect:
- First Contentful Paint (FCP) — delayed if CSS or JS block the initial render.
- Largest Contentful Paint (LCP) — delayed if the largest visual element depends on blocked resources.
- Time to Interactive (TTI) — worsens if JavaScript delays interactivity.
Common Causes of Render-Blocking
- Unoptimized CSS loaded in the <head> for the entire site, even if not used above the fold.
- Multiple blocking JavaScript files loaded synchronously at the top of the page.
- Third-party scripts (analytics, ads, widgets) placed without async/defer.
- Web fonts loaded synchronously without font-display: swap.
- CSS imports inside CSS files instead of combining them into one optimized file.
How Lighthouse Measures This
Lighthouse identifies all blocking resources during the page load simulation. It uses the Chrome DevTools protocol to record network requests and detect CSS and JS that are:
- Requested before First Paint
- Not loaded asynchronously or deferred
- In the critical rendering path
Developers can also manually measure render-blocking impact using the PerformanceObserver API or Chrome DevTools coverage tab to see unused code.
- new PerformanceObserver((entryList) => {
- for (const entry of entryList.getEntries()) {
- if (entry.entryType === 'paint') {
- console.log(entry.name, entry.startTime);
- }
- }
- }).observe({ type: 'paint', buffered: true });
What is a Good Score?
Lighthouse considers your render-blocking resources audit “passed” when:
- No render-blocking CSS or JS is detected in the initial load.
- All critical CSS is inlined, and non-critical CSS/JS is deferred or loaded asynchronously.

How to Eliminate Render-Blocking Resources
1. Inline Critical CSS
Identify the CSS required for above-the-fold content and inline it directly into the HTML <head>. Load the remaining styles asynchronously.
- <style>
- /* Critical CSS for visible content */
- body { font-family: sans-serif; }
- header { background: #fff; }
- </style>
- <link rel="stylesheet" href="styles.css" media="print" onload="this.media='all'">
2. Defer Non-Critical JavaScript
Use the defer attribute to load scripts after the HTML is parsed.
- <script src="main.js" defer></script>
3. Load Scripts Asynchronously
For scripts that don’t depend on DOM parsing order, use async.
- <script src="analytics.js" async></script>
4. Use preload for Key Resources
Preload important fonts, hero images, or CSS files needed early in the render path.
- <link rel="preload" href="https://cdn.testdom.io/css/critical.css" as="style" onload="this.rel='stylesheet'">
5. Combine and Minify CSS/JS
Reduce the number of HTTP requests and size of resources to minimize blocking time. Use build tools like Webpack, Rollup, or Gulp to merge and minify files.
6. Serve CSS and JS from a CDN
Hosting critical resources on a CDN reduces latency and speeds up downloads for global visitors.
7. Use HTTP/2 Multiplexing
With HTTP/2, multiple files can be transferred in parallel over a single connection, reducing the penalty of separate CSS/JS requests.
8. Optimize Font Loading
Fonts can block text rendering. Use font-display: swap and preload key fonts.
- @font-face {
- font-family: 'CustomFont';
- src: url('https://cdn.testdom.io/fonts/custom.woff2') format('woff2');
- font-display: swap;
- }
Monitoring and Continuous Testing
To maintain performance, continuously test for render-blocking resources using:
- Testdom.io — Automated Web Vitals and Lighthouse testing with historical tracking.
- Google PageSpeed Insights — Runs Lighthouse and flags blocking files.
- Chrome DevTools Coverage — Shows unused code to identify unneeded blocking CSS/JS.
- const { lhr } = await lighthouse(url, options);
- console.log('Render-blocking resources:', lhr.audits['render-blocking-resources']);
Benefits of monitoring include:
- Real-time detection of new blocking resources
- Historical performance comparisons
- Integration into CI/CD pipelines to prevent regressions