Free SEO audit for new clients — claim yours
Home/Blog/Technical SEO/How to Eliminate Render-Blocking Resources
Technical SEO

How to Eliminate Render-Blocking Resources

How to Eliminate Render-Blocking Resources
Table of contents
  1. Key Takeaways
  2. What makes a resource render-blocking?
    1. What Lighthouse flags
  3. Script loading options compared
  4. How to eliminate render-blocking resources: step by step
    1. Example: before and after
  5. Platform-specific approaches
  6. How this affects Core Web Vitals
  7. Common mistakes
  8. Related Guides
  9. Frequently Asked Questions
    1. What are render-blocking resources?
    2. Should I use async or defer?
    3. Can I remove all render-blocking CSS?
    4. Do render-blocking resources affect SEO?
    5. Why does PageSpeed Insights still flag a file after I deferred it?
  10. Conclusion
  11. References

You can have a fast server, compressed images and a CDN, and still stare at a blank white screen for a second or two. Often the culprit is a handful of files in the page’s <head>: stylesheets and scripts that the browser must download and process before it is allowed to paint anything. These are render-blocking resources, and they are one of the most common warnings in PageSpeed Insights.

Removing them entirely is rarely possible or desirable, because some CSS genuinely is needed to show the page correctly. The real goal is to make sure only the code needed for the first view blocks rendering, and that everything else loads without getting in the way.

This guide explains why browsers block rendering, how Lighthouse decides what counts as render-blocking, and a step-by-step process to fix it for CSS, JavaScript, fonts and third-party tags, with examples you can hand to a developer.

Key Takeaways

  • CSS blocks rendering by default, and classic scripts in the <head> block HTML parsing until they download and run.
  • Lighthouse flags head scripts without async or defer, and stylesheets that apply to the current device.
  • Use defer for most scripts, async for independent ones, and remove unused code.
  • Inline a small amount of critical CSS and load the rest without blocking, or split CSS by media query.
  • Fixing render-blocking resources mainly improves First Contentful Paint and Largest Contentful Paint.

What makes a resource render-blocking?

To draw a page, the browser builds the DOM from your HTML and the CSSOM from your CSS, combines them into a render tree, calculates layout and then paints pixels. This sequence is called the critical rendering path.

“CSS is render blocking: the browser blocks page rendering until it receives and processes all the CSS.”

— MDN Web Docs, Critical rendering path

The browser waits for CSS because it does not want to show unstyled content and then restyle it. JavaScript is different: a classic <script> without async or defer stops the HTML parser, because the script might change the document. Until the parser can continue, the browser cannot discover the rest of the page, including your hero image.

What Lighthouse flags

According to Chrome’s Lighthouse documentation, two kinds of resources are flagged:

  • A <script> in the <head> that has neither defer nor async.
  • A <link rel="stylesheet"> without a disabled attribute whose media matches the user’s device (media="all" counts as blocking).

In current versions of Lighthouse and PageSpeed Insights, this appears as the “Render blocking requests” insight, part of the move from individual audits to performance insights that Chrome completed in 2025. The logic and fixes are the same.

Script loading options compared

MarkupBlocks parsing?When it runsExecution orderUse for
<script src> in headYesImmediately when downloadedIn orderAlmost never; only tiny code that must run first
deferNoAfter HTML is parsed, before DOMContentLoadedIn orderMost site scripts and anything that touches the DOM
asyncNo (pauses briefly to execute)As soon as downloadedUnpredictableIndependent scripts such as some analytics tags
type="module"NoDeferred by defaultIn orderModern JavaScript bundles
Inline <script>Yes, while runningImmediatelyIn orderVery small critical snippets

How to eliminate render-blocking resources: step by step

  1. Find the blockers. Run PageSpeed Insights on your key templates (home, category, product or service, blog post) and note the files listed under render-blocking requests, with their estimated savings.
  2. Measure coverage. Open Chrome DevTools, run the Coverage tool and reload. It shows how much of each CSS and JavaScript file is actually used on that page. Large unused percentages point to code you can split or remove.
  3. Remove what you do not need. Old sliders, unused plugins, duplicate libraries and abandoned tracking tags are common. Chrome’s guidance is blunt: code that isn’t used at all should be removed.
  4. Defer scripts. Add defer to scripts in the head, or move them to type="module". Test interactive features afterwards.
  5. Use async for independent third-party tags that do not depend on other scripts, and consider loading non-essential widgets (chat, reviews, social embeds) after user interaction.
  6. Extract and inline critical CSS. Put the small set of styles needed for above-the-fold content in a <style> block, and load the full stylesheet without blocking.
  7. Split CSS by media query so print styles or desktop-only styles do not block mobile rendering.
  8. Handle fonts. Self-host critical fonts, preload only the one or two used above the fold, and use font-display so text shows promptly.
  9. Retest in lab and field. Confirm the warnings are gone and check that nothing renders unstyled (a “flash of unstyled content”).

Example: before and after

A typical blocking <head>:

<head>
  <link rel="stylesheet" href="css/styles.css">
  <link rel="stylesheet" href="css/print.css">
  <script src="js/jquery.js"></script>
  <script src="js/slider.js"></script>
</head>

The same head, optimised:

<head>
  <style>
    /* critical above-the-fold CSS, kept small */
    header, .hero { /* ... */ }
  </style>
  <link rel="preload" href="css/styles.css" as="style"
        onload="this.onload=null;this.rel='stylesheet'">
  <noscript><link rel="stylesheet" href="css/styles.css"></noscript>
  <link rel="stylesheet" href="css/print.css" media="print">
  <script src="js/jquery.js" defer></script>
  <script src="js/slider.js" defer></script>
</head>

The print stylesheet no longer blocks screen rendering because its media does not match, the main stylesheet loads without blocking, and the scripts run in order after parsing. Keep critical CSS small: inlined CSS cannot be cached separately, and a large inline block simply moves the problem into the HTML.

Platform-specific approaches

PlatformTypical approachWatch out for
WordPressPerformance plugins that defer JavaScript, generate critical CSS and remove unused CSS per pageBroken menus, forms or sliders after deferring; test every template
ShopifyAudit theme and app scripts; remove leftover code from uninstalled appsApps injecting blocking scripts into theme.liquid
React, Next.js and similarFramework script strategies, code splitting and server renderingLarge hydration bundles that shift the problem to interactivity
Tag managersLoad the container asynchronously and trim unused tagsSynchronous custom HTML tags inside the container

If your site relies heavily on client-side JavaScript, our guides to JavaScript SEO and server-side rendering explain the bigger architectural choices.

How this affects Core Web Vitals

Render-blocking resources delay the first paint, which pushes back Largest Contentful Paint. In web.dev’s breakdown of LCP, blocking CSS and scripts show up as “element render delay”: the hero image may have downloaded, but it cannot be painted until blocking work finishes. Deferring scripts also tends to reduce long tasks during load, which can help Interaction to Next Paint for visitors who interact early. For the full picture of the three metrics, see our Core Web Vitals guide.

Common mistakes

  • Deferring scripts that inline code depends on. An inline jQuery(...) call fails if jQuery is now deferred. Defer both, or move the inline code into a deferred file.
  • Using async for scripts with dependencies, which run in an unpredictable order and break.
  • Inlining the entire stylesheet. This bloats every HTML response and defeats caching.
  • Preloading everything. Too many preloads compete for bandwidth so nothing is prioritised.
  • Chasing a lab score only. Check field data; a perfect lab score with a broken layout is not a win.
  • Ignoring third parties. Chat widgets, A/B testing tools and consent banners are frequent blockers. Our Lighthouse audit guide shows how to identify their impact.

Frequently Asked Questions

What are render-blocking resources?

Files, usually CSS stylesheets and synchronous JavaScript in the page head, that the browser must download and process before it can display content.

Should I use async or defer?

Use defer for most scripts, because it preserves execution order and runs after the HTML is parsed. Use async only for independent scripts that do not rely on other code.

Can I remove all render-blocking CSS?

Not sensibly. Some CSS is needed to show the first view correctly. Inline a small critical portion and load the rest without blocking.

Do render-blocking resources affect SEO?

Indirectly. They slow First Contentful Paint and Largest Contentful Paint, which are part of page experience. Google can still index the content.

Why does PageSpeed Insights still flag a file after I deferred it?

Check that the change is live and not cached, that the script is actually deferred in the final HTML, and that stylesheets have a non-matching media attribute or load asynchronously.

Conclusion

Eliminating render-blocking resources is about priorities: let the browser paint the first view with as little code as possible, and load everything else without standing in the way. Remove unused code, defer scripts, inline a small amount of critical CSS and test carefully. If your theme or plugins make this hard, our page speed optimization service can do it safely, or get a free quote.

References

  1. Eliminate render-blocking resources – Chrome for Developers
  2. Critical rendering path – MDN Web Docs
  3. Optimize Largest Contentful Paint – web.dev
  4. Preload critical assets – web.dev
  5. Moving Lighthouse to performance insights – Chrome for Developers
  6. Google PageSpeed Insights: What It Is and How to Boost Your Score – Semrush Blog
Rohit Choudhary
Written byRohit ChoudharyCo-Founder, My SEO Experts

Rohit Choudhary is the co-founder of My SEO Experts and has more than 14 years of hands-on experience in SEO, paid advertising and digital marketing. Since starting out in 2011 he has helped hundreds of businesses grow through practical, data-driven search strategies, and he also serves as a consulting Digital Marketing Director for several US-based companies.

Keep reading

Related articles

Ready to grow your business online?

Get a free, no-obligation proposal tailored to your goals and budget.

CallFree Quote