How to Fix Render-Blocking Resources on Your Website
Render-blocking resources are scripts and stylesheets in the page head that the browser must download and process before it can paint anything. This guide shows you how to find them on every affected page, defer non-critical JavaScript, inline the CSS needed for above-the-fold content, and load the rest without blocking.

Why it matters
Each blocking file in the head adds at least one network round trip before first paint, which delays First Contentful Paint and Largest Contentful Paint. LCP is a Core Web Vitals metric used in Google's page experience signals, and slow first paint increases bounce on mobile connections. Crawlers that render pages, including some AI answer engines, also time out sooner on heavy pages.
Because the audit counts how many of your pages are affected, fixing shared templates such as the header usually clears most of the problem at once.
What you need
Step-by-step fix
List the blocking files on your key templates
Run your homepage, a category page, a product or post page and a landing page through PageSpeed Insights and open the Render-blocking requests insight (older Lighthouse versions call it "Eliminate render-blocking resources"). Note each URL and its estimated savings. In Chrome DevTools, open More tools > Coverage, reload, and check how much of each CSS and JS file is unused on first load.
Group the files by template, since one shared header usually causes most failures.
Add defer to scripts in the head
Any <script src> in the head without defer, async or type="module" blocks parsing. Add defer to your own scripts: they download in parallel and run in order after the HTML is parsed. Use async only for independent third-party scripts such as analytics that don't depend on other code.
Inline scripts that call a deferred library must also run after it, so move them into a deferred file or wrap them in a DOMContentLoaded listener.
<!-- Before --> <script src="/js/jquery.min.js"></script> <script src="/js/app.js"></script> <!-- After --> <script src="/js/jquery.min.js" defer></script> <script src="/js/app.js" defer></script> <script async src="https://analytics.example.com/tag.js"></script>
Remove or delay non-essential third-party tags
Chat widgets, heatmaps, A/B testing snippets and social embeds are frequent blockers. Delete tags you no longer use, then load the rest after the page is interactive. A/B testing tools that hide the page until they run (anti-flicker snippets) should be limited to the pages actually running tests.
<script>
window.addEventListener('load', function () {
var s = document.createElement('script');
s.src = 'https://chat.example.com/widget.js';
s.async = true;
document.body.appendChild(s);
});
</script>Generate and inline critical CSS
Critical CSS is the minimum set of rules needed to style the content visible without scrolling. Generate it per template with a tool such as critical or beasties, then place it in a <style> block in the head. Keep it under roughly 14 KB compressed so it fits in the first network round trip.
npm install --save-dev critical npx critical dist/index.html --base dist --inline --width 412 --height 915 > dist/index.critical.html
Load the full stylesheet without blocking
After inlining critical CSS, load the main stylesheet with rel="preload" and switch it to a stylesheet when it arrives. Keep a <noscript> fallback for visitors without JavaScript. Stylesheets that only apply in specific conditions, such as print, should carry a matching media attribute so the browser doesn't block on them.
<style>/* critical above-the-fold CSS here */</style> <link rel="preload" href="/css/main.css" as="style" onload="this.onload=null;this.rel='stylesheet'"> <noscript><link rel="stylesheet" href="/css/main.css"></noscript> <link rel="stylesheet" href="/css/print.css" media="print">
Fix web font stylesheets
A Google Fonts or Adobe Fonts <link> in the head is a render-blocking stylesheet on a separate domain. Self-host the font files and declare them in your own CSS with font-display: swap. Preload only the one or two weights used above the fold.
<link rel="preload" href="/fonts/inter-var.woff2" as="font" type="font/woff2" crossorigin>
<style>
@font-face {
font-family: "Inter";
src: url("/fonts/inter-var.woff2") format("woff2");
font-weight: 100 900;
font-display: swap;
}
</style>Retest every template and re-run the audit
Clear your page cache and CDN cache, then re-run PageSpeed Insights on the same URLs from step 1. Confirm the render-blocking insight is gone or lists only the small, intentional files that remain. Click through menus, forms, sliders and checkout to make sure deferred scripts still work.
Then re-run the site audit, because it reports the share of crawled pages that still have blocking resources.
Platform-specific notes
WordPress
Since WordPress 6.3, developers can pass array('strategy' => 'defer', 'in_footer' => true) to wp_enqueue_script. Without code, plugins such as WP Rocket (File Optimization > Load JavaScript deferred and Remove unused CSS), Perfmatters, LiteSpeed Cache (Page Optimization) or Autoptimize can defer JS and generate critical CSS. Exclude jQuery from deferral if theme inline scripts depend on it.
Shopify
Go to Online Store > Themes > ... > Edit code and open layout/theme.liquid. Add defer to script tags, and use {{ 'base.css' | asset_url | stylesheet_tag: preload: true }} where appropriate. App embeds inject their own scripts, so disable unused ones under Theme settings > App embeds.
Next.js
Use next/script with strategy="afterInteractive" or "lazyOnload" for third-party code rather than raw script tags in the head. Use next/font to self-host fonts. CSS Modules and Tailwind output are already split per route; for critical CSS inlining in the Pages Router, the experimental optimizeCss option uses beasties.
Webflow
Put custom scripts in Site settings > Custom code > Footer code (before </body>) instead of Head code, and add defer or async to them. Webflow's own site stylesheet can't be made async, so focus on removing third-party head embeds and unused interactions.
Cloudflare
Rocket Loader (Speed > Optimization > Content Optimization) defers all JavaScript automatically, but it can break scripts that expect synchronous loading. Test it on staging, and exclude specific scripts with data-cfasync="false".
Check that it worked
✅ How to verify
- PageSpeed Insights no longer flags blocking requests, or lists only intentional files, on each key template (mobile test).
- In DevTools > Network, filter by JS and CSS and check that the first paint marker in the Performance panel appears before non-critical files finish loading.
- View the page source and confirm head scripts carry defer, async or type="module", and that non-critical stylesheets use preload or a media attribute.
- Re-run the site audit and confirm the number of affected pages has dropped.
⚠️ Common mistakes
- Deferring jQuery while leaving inline scripts that call $() right after it, which breaks menus and forms.
- Loading every stylesheet asynchronously without inlining critical CSS, which causes a flash of unstyled content and layout shift.
- Fixing only the homepage when the blocking tags live in a shared header used by every page.
- Inlining an entire 150 KB stylesheet as "critical" CSS, which bloats every HTML response.
Is this still an issue on your site? Run a free audit — ZORO checks this and 294 other SEO, AI-visibility, accessibility and security signals, with fixes for your platform.
Check my site freeFAQ
What is the difference between async and defer?
Both download the script without blocking HTML parsing. Defer runs scripts in document order after parsing finishes. Async runs each script as soon as it downloads, in any order. Use defer for your own code and async for independent third-party tags.
Is all CSS render-blocking?
Any <link rel="stylesheet"> without a non-matching media attribute blocks rendering. That's by design, so the page doesn't paint unstyled. The fix is to inline the small critical part and load the rest without blocking, not to remove CSS.
Will fixing render-blocking resources improve my rankings?
It improves First Contentful Paint and Largest Contentful Paint, which feed Core Web Vitals. Those are a lightweight ranking signal, so expect larger gains in user engagement and conversions than in rankings on their own.
Should I move all scripts to the footer instead of using defer?
Using defer in the head is usually better. The browser discovers and starts downloading the file earlier but still waits until parsing is done to run it. Footer placement works too, but downloads start later.
How to Fix Unminified CSS and JavaScript Files on Your Site
How to Fix Total Page Weight: Get Your Homepage Under 2 MB
How to Enable Gzip or Brotli Compression on Your Website
How to Fix Slow Time to First Byte (TTFB) on Your Website
How to Fix Browser Caching Headers on Static Assets
How to Fix Cumulative Layout Shift (CLS) on Your Website