Overview

The Critical Rendering Path (CRP) is the process by which a browser receives code and transforms it into a visual representation. Optimizing the CRP is fundamental to improving web performance and ensuring a fast initial load experience.

Key Stages

  1. DOM Construction: Parsing HTML to build the Document Object Model.
  2. CSSOM Construction: Parsing CSS to build the CSS Object Model.
  3. Render Tree: Combining DOM and CSSOM to determine what is visible.
  4. Layout: Calculating the exact position and size of each element.
  5. Paint: Filling in the pixels on the screen.

Optimization Strategies

  • Minifying Resources: Reducing the size of HTML, CSS, and JS files.
  • Eliminating Render-Blocking Resources: Deferring non-critical CSS and JavaScript.
  • Optimizing the Order: Loading critical CSS as early as possible.

Related Terms