Home / Fix guides / Speed and Core Web Vitals

How to eliminate render-blocking resources

Render-blocking resources are CSS and JavaScript files that the browser must download and process before it can show anything on screen. You eliminate them by loading scripts with defer, delivering only the critical CSS up front, and removing files the page does not need.

When someone opens your page, the browser reads the HTML from top to bottom. If it meets a stylesheet or a plain script in the <head>, it stops drawing the page until that file has been downloaded and handled. Those files are called render-blocking. Visitors experience it as a blank white screen for a moment, even though your server answered quickly.

This page explains what is going on, how to check your own site with free tools, and how to fix it on common platforms without needing to be a developer.

What people see

The symptoms are simple: the page stays blank or half drawn, then everything appears at once. On a slow phone connection the wait is longer. In speed tests you will usually see a warning such as "Eliminate render-blocking resources" or "Render blocking requests" (the wording changes between versions of Google's tools).

Two kinds of file cause it:

  • CSS (stylesheets): the browser needs the styles before it paints, so it waits for them by design. The problem is when you load far more CSS than the first screen needs.
  • JavaScript loaded in the <head> without defer or async: the browser stops reading the page, runs the script, and only then carries on.

Why it matters

Blocking delays First Contentful Paint (the first moment anything appears) and often Largest Contentful Paint, which is one of the Core Web Vitals that Google uses as part of its page experience signals. Slower pages tend to lose visitors before they read a word, which hurts enquiries and sales. It is rarely the biggest ranking factor, but it is one of the most fixable causes of a slow first impression.

How to check if your site has it

You can test this for free in a few minutes:

  1. Go to PageSpeed Insights (pagespeed.web.dev) and enter your page address. Test the mobile result first.
  2. Open the Diagnostics or Insights section and look for "Render blocking requests" or "Eliminate render-blocking resources".
  3. Expand it. You will see a list of files and the time each one is estimated to cost. Files from your theme, plugins, fonts or tracking tools are the usual suspects.
  4. For more detail, open the page in Chrome, press F12, choose the Lighthouse tab and run a mobile report. WebPageTest.org also shows a waterfall where blocking files appear before the first paint.

Test your home page and one or two important inner pages, such as a product or service page, because each can load different files. SiteMonday checks this as part of its speed and Core Web Vitals service in week 4, with the results in a written report and a ranked fix list.

How to fix it in general

Work through these in order. The first two give most of the benefit.

  1. Add `defer` to scripts. A deferred script downloads while the page is read and runs after the HTML is finished, in order. This is the safe default for most scripts. Use async only for independent scripts (such as some analytics tags) because async scripts run in whatever order they arrive.
  2. Move scripts you do not need immediately. Chat widgets, pop ups and tracking tools can load later. If a script is not needed for the first screen, it should not delay it. Our guide on third party scripts covers this.
  3. Reduce CSS to what is needed. Remove stylesheets from plugins or apps you no longer use, and avoid loading one huge stylesheet on every page.
  4. Inline critical CSS. Critical CSS is the small amount of styling needed for the top of the page. It is placed directly in the HTML, and the rest of the stylesheet loads without blocking. Tools and plugins can generate this for you.
  5. Load non critical CSS later. A common pattern looks like this:
<link rel="stylesheet" href="/styles/extra.css" media="print" onload="this.media='all'">
<noscript><link rel="stylesheet" href="/styles/extra.css"></noscript>
  1. Use `media` attributes. A stylesheet marked media="print" does not block screen rendering.

Be careful with step 4 and 5: if you defer CSS the wrong way, the page can flash unstyled content or shift around as styles arrive. Always check the page on a phone afterwards. If you also see text jumping, see font layout shift.

If a script stops working after you add defer (a slider, a menu or a form, for example), it probably depends on loading earlier or on another script. Undo that one change and ask your developer to check the load order.

Common platforms

Exact menus depend on your theme, plugins and version, so treat these as where to look rather than exact clicks.

PlatformWhat you can usually do
WordPressA performance or caching plugin often has options such as delay or defer JavaScript and optimise or inline critical CSS. Also deactivate plugins you do not use.
ShopifyCheck the theme's theme.liquid for scripts in the head, and remove apps that leave code behind. Add defer to scripts you control.
Wix, SquarespaceYou have little control over core files. Remove unneeded apps, embeds and custom code injected in the header.
WebflowMove custom code from the head to before the closing body tag, and reduce unused custom scripts and embeds.
ElementorLook in its performance or experiments settings for optimised loading of CSS and scripts, and avoid unused widgets.
CloudflareFeatures such as Rocket Loader can defer JavaScript, but test carefully because they can break some scripts.

Detailed steps are in our guides for WordPress and Shopify.

How to confirm the fix worked

  1. Clear any caches (your plugin cache and any CDN cache) so the test sees the new version.
  2. Run PageSpeed Insights again on the same page and device type, and compare the First Contentful Paint and Largest Contentful Paint values with your earlier run.
  3. Check that the blocking files are gone from the list or much shorter. Some blocking CSS is normal, so the goal is less of it, not necessarily none.
  4. Open the page on a real phone. Click the menu, the forms and any buttons. A faster page that does not work is worse than a slow one.

Results vary a little between runs, so test two or three times before deciding.

How to stop it coming back

Render blocking usually creeps back when something new is added to the site.

  • Test the page speed after installing any new plugin, app, theme or tracking tag.
  • Remove tools you no longer use, because their files often keep loading.
  • Ask whoever adds scripts to use defer by default.
  • Retest regularly. SiteMonday runs its speed review in week 4 each year, but a quick PageSpeed check after any big change is cheap insurance.

Once blocking files are reduced, the next steps are usually trimming code that is never used (see unused JavaScript), which makes every page lighter.

Step by step for your platform

Questions

What is the difference between defer and async?

Both download the script without stopping the page. `defer` runs scripts in order after the HTML is read, while `async` runs each one as soon as it arrives, in any order, so `defer` is safer for most scripts.

Can I remove all render-blocking CSS?

Usually not, and you do not need to. The browser needs some CSS to draw the page correctly, so the aim is to load only what the first screen needs up front.

Will fixing this improve my Google rankings?

It can help by improving load metrics such as Largest Contentful Paint, which feed into Google's page experience signals. Content and relevance still matter more, so expect a modest benefit rather than a jump.

Why did my site break after I deferred JavaScript?

Some scripts rely on another script loading first or on running immediately. Undo the change for that script and ask a developer to set the right load order.

Do I need a developer to fix this?

Not always. On WordPress and similar platforms, a performance plugin or app settings can handle many cases, but custom themes or broken scripts may need a developer.

Is the warning different in PageSpeed Insights now?

Google has changed the wording over time, and you may see "Render blocking requests" instead of "Eliminate render-blocking resources". Both point to the same problem and the same fixes.

Related problems