First Contentful Paint (FCP)
You'll learn how FCP measures visual feedback speed and why SSR significantly improves it compared to CSR.
What is First Contentful Paint?
First Contentful Paint (FCP) is a performance metric that measures the time from when the page starts loading to when any part of the page's content is rendered on the screen. This "content" includes text, images, SVG elements, or even non-white canvas elements — essentially the first moment a user sees something meaningful rather than a blank white screen.
Think of it like a restaurant: TTFB (which you learned previously) is when the kitchen acknowledges your order, while FCP is when the first appetizer arrives at your table. The faster that first visual feedback appears, the less anxious users feel about whether the page is actually loading.
Why SSR Improves FCP
With Client-Side Rendering (CSR), the browser receives a minimal HTML shell, downloads JavaScript, executes it, and then renders content. This creates a long delay before FCP:
- Browser receives empty HTML
- Downloads JS bundle
- Executes JS
- Finally paints content ← FCP happens here
With Server-Side Rendering (SSR), the server sends fully-rendered HTML immediately. The browser can paint content as soon as it arrives:
- Browser receives complete HTML
- Paints content immediately ← FCP happens here (much earlier!)
- Later: Downloads and hydrates JS
This is why SSR typically shows FCP improvements of 40-60% compared to CSR — users see content while JavaScript is still loading in the background.
Key Takeaway: FCP measures when users first see visual feedback; SSR dramatically improves FCP by sending rendered HTML immediately instead of waiting for client-side JavaScript execution.