Google Page Speed
render blocking
async loading
web performance
resource optimization

Google Page Speed still giving render blocking issue even after loading resources async

Data Structures & Algorithms practice on Codemia

Step through 300+ coding interview problems with animated visualisers that show the data structure changing as the code runs. The Blind 75 are free.

Practice algorithms

Introduction

Adding async to a script does not guarantee that PageSpeed will stop reporting render-blocking resources. The audit is about the critical rendering path, and scripts are only one part of it. CSS, fonts, execution timing, and third-party code can still delay the first paint.

Why async does not always solve it

async changes when a script runs, but it does not make the script free. An async script downloads in parallel, then executes as soon as it finishes. If that happens while the browser is still parsing the page, parsing pauses so the script can run.

For scripts that touch the DOM or depend on document order, defer is often the better choice:

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

Deferred scripts download in parallel but wait until HTML parsing is complete before they execute. That usually reduces interference with the first render.

CSS is often the real render blocker

Even if all scripts are async or deferred, external stylesheets still block rendering because the browser wants CSSOM data before painting the page correctly.

If the initial page only needs a small amount of styling, inline the critical CSS and load the full stylesheet non-blockingly:

html
1<style>
2  body { font-family: sans-serif; margin: 0; }
3  .hero { padding: 2rem; }
4</style>
5
6<link
7  rel="preload"
8  href="/assets/site.css"
9  as="style"
10  onload="this.onload=null;this.rel='stylesheet'">
11<noscript>
12  <link rel="stylesheet" href="/assets/site.css">
13</noscript>

That approach reduces blocking work before the first paint. Use it carefully, because shipping too much inline CSS hurts caching and can make HTML heavier.

Third-party resources still count

PageSpeed frequently points to:

  • analytics scripts
  • tag managers
  • ad networks
  • font provider stylesheets
  • widget bundles

Even if these are marked async, they may inject more resources, request blocking CSS, or run long tasks on the main thread. A common example is loading web fonts through a stylesheet that delays text rendering.

A cleaner font setup can help:

html
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preload" href="/fonts/Inter.woff2" as="font" type="font/woff2" crossorigin>

Also make sure your @font-face rules use font-display: swap in your stylesheet.

Measure the whole critical path

When PageSpeed still complains, inspect the waterfall in Lighthouse or WebPageTest. Look for:

  • stylesheets in the document head
  • async scripts that finish early and execute before parsing completes
  • large JavaScript bundles that monopolize the main thread
  • third-party resources that inject additional blocking assets

The fix is often architectural rather than attribute-based. In many pages, splitting one large bundle, delaying non-critical widgets, and inlining only above-the-fold CSS has more impact than changing async to defer alone.

A safer baseline pattern

If you want a strong default for many server-rendered pages, this is a better starting point than marking every script async:

html
<link rel="stylesheet" href="/assets/critical.css">
<script defer src="/assets/runtime.js"></script>
<script defer src="/assets/app.js"></script>

Then load non-essential widgets after the page becomes interactive:

html
1<script>
2window.addEventListener('load', function () {
3  var s = document.createElement('script');
4  s.src = '/assets/chat-widget.js';
5  s.async = true;
6  document.body.appendChild(s);
7});
8</script>

Common Pitfalls

  • Assuming async is always better than defer. It often is not for application code.
  • Focusing on scripts while leaving blocking stylesheets untouched.
  • Ignoring third-party tags that inject more blocking resources after page load starts.
  • Inlining too much CSS and making the HTML response large and uncacheable.
  • Treating a PageSpeed warning as a literal parser block when the real issue is main-thread work or a long critical request chain.

Summary

  • 'async can still interrupt parsing when the script finishes downloading.'
  • 'defer is usually a better default for ordered application scripts.'
  • CSS and font-loading patterns are common reasons PageSpeed still reports render-blocking work.
  • Third-party tags can reintroduce blocking even after your own scripts are optimized.
  • Use Lighthouse or WebPageTest waterfalls to identify the real blocker before changing markup blindly.

Course
Intermediate
27 lessons
15 hours
DSA Fundamentals

Master algorithmic patterns and data structures through hands-on LeetCode-style problems - from arrays and hashing to dynamic programming and advanced graphs.

View the course
Data Structures & Algorithms practice on Codemia

Step through 300+ coding interview problems with animated visualisers that show the data structure changing as the code runs. The Blind 75 are free.

Practice algorithms