Go straight to the answers
Vega SEO Talks

Why does switching from client-side rendered hero text to server-rendered HTML sometimes worsen LCP instead of improving it?

Answered 3-minute answer rooted in 1 page

Because server rendering moves time from one LCP subpart to another, and the move is not always a saving. Putting the hero text in the HTML removes the wait for JavaScript to fetch data and render it, which shortens element render delay. But if the server now has to fetch that data and render the page before sending anything, the first byte arrives later, and time to first byte is the first subpart of LCP. When the added TTFB is larger than the render delay removed, LCP gets worse. A second route is the LCP element itself changing, for example from text to an image that now loads later.

Where the time goes before and after

web.dev’s LCP optimization guide splits LCP into four parts: time to first byte, resource load delay, resource load duration and element render delay. For text rendered with a system font, the guide notes there is no resource to load, so LCP is mostly TTFB plus render delay.

Client-side rendered hero Server-rendered hero
TTFB A fast, mostly static HTML shell Waits for server data fetching and rendering
Element render delay Waits for JavaScript to load, fetch data and render Can paint as soon as HTML and CSS are ready
Net effect on LCP Depends on which side is larger Depends on which side is larger

The guide also notes that shortening one subpart can simply shift time into another. Its example is an image format change that shortens load duration while the element still waits for JavaScript, so the time moves to render delay and LCP does not improve. The same logic applies here in reverse: server rendering can remove render delay while TTFB grows.

Ways the switch makes LCP worse

Slower first byte. The server now waits for the data the hero needs before it can send any bytes. If that data comes from a slow API or an uncached database query, TTFB grows by that amount on every request.

The shell is no longer cacheable. A static HTML shell can be served from a CDN edge. A page rendered per request with personalized or frequently changing data may not be, so visitors far from the origin pay more for connection and transit.

A different LCP element. Once text renders early, a large image elsewhere in the viewport may become the largest element. If that image is referenced from CSS or JavaScript, it can be discovered late. The guide’s advice is that the browser should be able to find the LCP resource in the HTML source itself.

Render-blocking resources still in the way. Text in the HTML still cannot paint until blocking CSS and fonts allow it. If a web font blocks text rendering, the render delay the change was meant to remove remains.

How to keep the gain

  1. Measure the subparts before and after. Compare TTFB and element render delay from real visits for the hero template. The change worked only if the sum went down.
  2. Make server data fast or cacheable. Cache the hero data, or render the static part of the page immediately and fill in slower parts later, so the first byte does not wait for the slowest query.
  3. Keep the HTML cacheable at the edge where possible, and vary only what must vary.
  4. Check what the LCP element is after the change. If it moved to an image, make that image discoverable in the HTML and prioritize it.
  5. Remove blocking that delays the text. Inline critical CSS and use a font loading strategy that does not hide text.

Server rendering removes a real source of delay for LCP-critical text. It improves LCP when the server can send the page quickly, and the measurement to trust is the field breakdown, not the architecture diagram.

Answers that share these roots

  1. Is it true that TTFB is not a Core Web Vital and therefore has no direct impact on Google page experience ranking signals? shares 1 page
  2. Why does Largest Contentful Paint sometimes attribute delay to TTFB even when server response times are under 200ms? shares 1 page
  3. Why can serving AVIF to all supporting browsers backfire for Core Web Vitals when the encoding profile is not calibrated for decoding speed alongside file size? shares 1 page
  4. What is the optimal resource-loading strategy to ensure an above-the-fold background image does not become the LCP bottleneck on responsive layouts? shares 1 page
  5. What end-to-end image optimization pipeline should a media-heavy site implement to guarantee LCP compliance across device tiers without manual intervention per image? shares 1 page
  6. Is it true that converting all images to WebP is sufficient image optimization for passing Core Web Vitals, making further compression or responsive sizing unnecessary? shares 1 page

Replies to this answer

Leave a Reply

Your email address will not be published. Required fields are marked *