Render blocking delays what appears on screen; parser blocking prevents the main HTML parser from continuing to process the document. While waiting for render-blocking CSS, the browser can usually still parse subsequent HTML. When it encounters synchronous JavaScript, however, the main parser must wait for the script to finish executing before continuing. Parser blocking also delays the display of content after the script, but neither type of blocking stops all browser activity.
Render blocking: process styles before displaying content
CSS is render-blocking by default: the browser must download and process external stylesheets before it can display the content they block. This prevents the initial display from being unusable or looking broken, but it does not mean every resource on the page must finish loading.
Browsers process HTML as it arrives. To start rendering, they usually need only some of the HTML and must process the render-blocking CSS and JavaScript in the head; they do not need to wait for the complete document. While waiting for CSS, the browser can continue processing HTML and looking for other work it can do.
- If a stylesheet’s media attribute does not match the current conditions—for example, media=”print” when viewing on a screen—it need not block rendering.
- Some browsers block only the content that follows the resource. If a blocking resource is in the head, it effectively blocks the initial rendering of all page content.
Parser blocking: subsequent content has not yet been processed
A synchronous script in HTML that has neither async nor defer and is not a module blocks the main parser. JavaScript may modify the DOM or CSSOM during execution, so the browser must wait for the result before continuing to process the document.
For example, if a synchronous script appears before an article, the main parser must wait for it to download and finish executing before processing the article. Previously processed content may still be displayed. If the script is in the head, however, it effectively blocks the rendering of all page content. Parser blocking can therefore have a greater performance impact than simply waiting to render.
Later resources can start downloading while parsing is still blocked
The preload scanner is a secondary HTML parser that scans the raw HTML and downloads resources it expects to be needed. For example, while a script blocks the main parser, the scanner may still discover images farther down the document and start downloading them.
Downloading ahead of time reduces the chance of having to wait for resources later, but it cannot replace the main parser’s processing of HTML. Seeing later images start downloading therefore does not mean the main parser is unblocked.
When diagnosing a delay, identify which step is blocked
- First, check resource types, script attributes, the conditions under which stylesheets apply, and where each resource appears in the document.
- Then compare the network waterfall with when rendering begins. According to web.dev, WebPageTest can identify render-blocking resources, while Lighthouse flags only resources that actually delay rendering, helping reduce false positives.
- Distinguish the first paint from the display of content: if you are focusing on FCP or LCP, also account for resources needed to display that content, even if they are not necessarily render-blocking.
Render-blocking and parser-blocking resources: perspectives from across the web
Can asynchronous or deferred scripts completely eliminate parsing delays?
Not necessarily. With async on an external script, downloading can proceed alongside HTML parsing, but parsing still pauses while the script executes. With defer, downloading does not block parsing, and the script executes after HTML parsing is complete. Consider delaying the loading of JavaScript that is not needed immediately, but choose an approach that suits when the script needs to run.
Can a synchronous script execute immediately while CSS is still pending?
Not necessarily. A synchronous script may have to wait until render-blocking CSS has finished downloading and been parsed before it can execute. This is because the script may read styles declared in the stylesheet. Even if the browser can process some HTML while waiting for CSS, the main parser may become blocked when it reaches that synchronous script and remain blocked until the script finishes executing.
Can rendering alone be blocked while the parser continues processing the document?
Yes. Starting with Chrome 105, you can explicitly request this behavior by setting blocking=render on a link, script, or style element. The browser blocks rendering until the element has been processed while allowing the parser to continue processing the document. This shows that waiting to render and waiting to parse are not the same thing. Before using it, check support in your target browsers.
References
- Understand the critical pathweb.dev — Discusses: Can a synchronous script execute immediately while CSS is still pending?; Can rendering alone be blocked while the parser continues processing the document?
- Optimize resource loadingweb.dev — Discusses: Can a synchronous script execute immediately while CSS is still pending?
- Core Web Vitals (核心頁面指標) 是什麼及如何優化-完整版tenten.co · 2022-06-30T16:51:16.000Z — Discusses: Can asynchronous or deferred scripts completely eliminate parsing delays?




