Trace: Browser Renders a Page
The Critical Rendering Path
graph LR
A[Network] --> B[DOM Construction]
C[Network] --> D[CSSOM Construction]
B --> E[Render Tree]
D --> E
E --> F[Layout]
F --> G[Paint]
G --> H[Composite]Key Takeaways
- CSS is render-blocking: the browser waits for CSSOM before building the Render Tree.
- JavaScript is parser-blocking: executing JS can modify the DOM, so the parser pauses.
- Layout is expensive: reading element geometry triggers a recalculation of the entire Render Tree.
- Paint is expensive: rasterizing pixels is costly, especially for large viewports.