critical rendering path
The sequence of steps from receiving HTML, CSS and JavaScript to drawing the first pixels: build the DOM and CSSOM, the render tree, layout and paint.
In more detail
Anything that delays one of those steps, such as a slow stylesheet or a parser-blocking script, delays the first render. Optimising the path means loading fewer critical resources, making them smaller and fetching them earlier.
Related terms
- render-blocking resource — A file, usually a stylesheet in the head or a synchronous script, that the browser must finish loading before it will draw the page.
- defer attribute — A script attribute that downloads the script in the background and runs it, in document order, only after the HTML has finished parsing.
- preload — A resource hint, <link rel="preload">, that makes the browser download a file needed for the current page right away at high priority.
- render tree — The tree of visible elements with their computed styles, built from the DOM and CSSOM, that the browser uses for layout and painting.
Taught in
- Critical Rendering Path: Preload, Prefetch And Scripts — Frontend Architecture & Web Platform
- Core Web Vitals: Measuring And Optimizing LCP, INP, And CLS — Frontend Architecture & Web Platform