# Critical rendering path

> The critical rendering path is the browser

Canonical: https://scaplet.com/glossary/critical-rendering-path

Glossary Glossary · Performance

The critical rendering path is the browser's sequence from HTML, CSS, and JavaScript to pixels. The five steps, what blocks them, how to shorten it, and a check.

2 min

read

2

sources

Oct 31, 2026

updated

Scaplet Editorial Team

author

In one line

The critical rendering path is the sequence of steps a browser takes to turn HTML, CSS and JavaScript into pixels: build the DOM and CSSOM, combine them into a render tree, run layout, then paint. CSS blocks rendering and synchronous scripts block HTML parsing, so those are where optimization starts.

30-second check

## Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fcritical-rendering-path%20(%22Critical%20rendering%20path%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fcritical-rendering-path%20(%22Critical%20rendering%20path%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fcritical-rendering-path%20(%22Critical%20rendering%20path%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fcritical-rendering-path%20(%22Critical%20rendering%20path%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

## At a glance

4 facts from the sources below

DOM, CSSOM, render tree, layout, paint

Steps

CSS

Blocks rendering

Synchronous scripts

Blocks parsing

Faster first render

Goal

_01_At a glance

## The five steps

Step

### 1. DOM

What happens

HTML is parsed into [tokens](/glossary/tokenization), nodes, then a tree. Scripts can change it as it's built

Can start before all bytes arrive?

Yes, parsing is incremental

Step

### 2. CSSOM

What happens

CSS is parsed into a tree of style rules

Can start before all bytes arrive?

No, a later rule may override an earlier one

Step

### 3. Render tree

What happens

DOM and CSSOM combine. `display: none` elements and `<head>` are left out

Can start before all bytes arrive?

Needs both trees

Step

### 4. Layout

What happens

Size and [position](/glossary/average-position) of each element are computed. Depends on viewport width, so it reruns on resize

Can start before all bytes arrive?

Needs the render tree

Step

### 5. Paint

What happens

Pixels are filled in. First paint covers the whole screen, later paints usually just the changed areas

Can start before all bytes arrive?

Needs layout

This table follows MDN's critical [rendering](/glossary/rendering) path guide. The steps run in a loop for interactive pages, which is why DOM and style changes after load can trigger layout again.

_02_At a glance

## What blocks the path

Resource

### CSS

Effect

The browser won't render until all CSS is received and processed

Fix

Split with media queries so non-essential styles don't block. See [render-blocking](/glossary/render-blocking) and [critical CSS](/glossary/critical-css)

Resource

### Synchronous script

Effect

Parser pauses until the script is fetched and run

Fix

Defer it, mark it `async` where appropriate, or remove it

Resource

### Third-party origin

Effect

Requests start only when the parser finds them

Fix

Warm the connection early. See [dns-prefetch](/glossary/dns-prefetch) and [preconnect](/glossary/preconnect)

Blocking, deferred, and async resources

```
<head> <link rel="stylesheet" href="/app.css"> <!-- render-blocking CSS --> <script src="/analytics.js" async></script> <!-- does not pause parsing --> <script src="/app.js" defer></script> <!-- runs after parsing --> </head> <body> <script src="/legacy.js"></script> <!-- synchronous: pauses parsing --> </body>
```

_03_How it works

## How to shorten it

**Measure before optimizing**MDN says selector specificity and paint costs are usually tiny next to network and layout costs. Find the biggest bottleneck in the Performance panel first, and change that.

1. 01

### Reduce critical resources

Defer or `async` non-essential scripts and remove what you don't need. MDN also suggests media queries to split CSS.
2. 02

### Cut request count and size

Minify CSS and JavaScript and drop unnecessary requests.
3. 03

### Prioritize critical downloads

Make sure the assets needed for first render are fetched early. See [preload](/glossary/preload).
4. 04

### Keep the DOM lean

More nodes mean longer style, layout and paint work.
5. 05

### Set the viewport

On mobile, `<meta name="viewport" content="width=device-width">` makes layout match the device width rather than a default of about 960px.

_04_Check it

## Check it in 2 minutes

Run it on your own URL. Each stylesheet is a render-blocking request, and each script counted by the second line lacks `async` and `defer`. This is a rough count of the raw HTML: it won't see resources added by JavaScript, so confirm in the DevTools Performance panel or a Lighthouse run.

Count blocking tags in a page's HTML

```
curl -sL -A 'Mozilla/5.0' https://web.dev/ > page.html grep -o -i '<link[^>]*rel="stylesheet"[^>]*>' page.html | wc -l # stylesheets grep -o -i '<script[^>]*>' page.html | grep -v -i -E 'async|defer|type="module"' | wc -l # synchronous scripts
```

Questions

## Asked a lot.

1 questions people ask next, answered from the sources on this page.

_01_ Is the critical rendering path the same as Largest Contentful Paint?

No. The critical rendering path is the process that gets pixels on screen. Largest Contentful Paint is a metric that measures when the largest content element appears. Shortening the path can improve it, but you verify by measuring.

Sources · 2

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- mozilla.org
- web.dev

1. 01 [Critical rendering path (MDN)](https://developer.mozilla.org/en-US/docs/Web/Performance/Guides/Critical_rendering_path) developer.mozilla.org · checked 2026-11-01
2. 02 [Critical rendering path (web.dev)](https://web.dev/articles/critical-rendering-path) web.dev · checked 2026-11-01

## Keep learning

[All glossary](/glossary)

[Learn dns-prefetch Performance](/glossary/dns-prefetch) [Related Critical CSS Performance](/glossary/critical-css) [Read next preload Performance](/glossary/preload) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in glossary
[Crawl stats report](/glossary/crawl-stats-report) [Cross-domain tracking](/glossary/cross-domain-tracking) [CSAT (customer satisfaction score)](/glossary/csat)

More in Performance
[AVIF](/glossary/avif) [bfcache (back/forward cache)](/glossary/bfcache) [Brotli compression](/glossary/brotli-compression) [Cache-Control](/glossary/cache-control) [CDN](/glossary/cdn) [Chrome UX Report (CrUX)](/glossary/chrome-ux-report) [Content Security Policy](/glossary/content-security-policy) [Content-Length (HTTP header)](/glossary/content-length) [Core Web Vitals](/glossary/core-web-vitals) [Core Web Vitals report](/glossary/core-web-vitals-report) [CORS](/glossary/cors) [Critical CSS](/glossary/critical-css) [Critical rendering path](/glossary/critical-rendering-path) [Cumulative Layout Shift (CLS)](/glossary/cumulative-layout-shift) [dns-prefetch](/glossary/dns-prefetch) [Edge caching](/glossary/edge-caching) [fetchpriority](/glossary/fetchpriority) [First Contentful Paint](/glossary/first-contentful-paint) [First Input Delay (FID)](/glossary/first-input-delay) [font-display](/glossary/font-display) [Gzip compression](/glossary/gzip-compression) [HTTP caching](/glossary/http-caching) [HTTP/2](/glossary/http-2) [HTTP/3](/glossary/http-3)

Terms on this page
[Tokenization](/glossary/tokenization) [Average position](/glossary/average-position) [Rendering](/glossary/rendering) [Render-blocking](/glossary/render-blocking) [Critical CSS](/glossary/critical-css) [dns-prefetch](/glossary/dns-prefetch) [preconnect](/glossary/preconnect) [preload](/glossary/preload)

Free · 2 minutes

## Know the term. _Now check your site._

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **+212%** organic clicks in 90 days Ledgerly
