Skip to main content
Comparison

Hydration vs LCP (Largest Contentful Paint): What's the Difference?

By ยท Updated ยท 6 min read

Hydration and LCP: Two Distinct Performance Concepts

LCP (Largest Contentful Paint) is a user-facing rendering metric โ€” it records the moment the browser paints the largest visible element on screen, typically a hero image or headline. Hydration is a JavaScript execution process โ€” it is the step where a server-rendered HTML page gets event listeners and dynamic state attached so it becomes interactive. LCP measures what the user sees; hydration determines when the user can act.

These two concepts operate on different axes. LCP is a Core Web Vital measured in seconds and reported in tools like PageSpeed Insights and Chrome User Experience Report. Hydration is a development architecture pattern used in frameworks like React, Vue, and Next.js. Confusing them is common because both affect the perceived quality of a page load, but they are not substitutes for each other.

How LCP Is Measured and What Triggers It

The browser's rendering engine continuously tracks the largest element painted in the viewport during page load. When no larger element appears, the timestamp of that final paint is recorded as LCP. The element is most commonly a product hero image, a banner, or an above-the-fold heading. Google's threshold for a 'good' LCP is under 2.5 seconds from navigation start.

LCP is influenced by factors that precede JavaScript execution: server response time, render-blocking resources, image size and format, CDN proximity, and HTTP caching headers. A page can achieve a fast LCP even with zero JavaScript on it. This is why server-side rendering (SSR) and static site generation (SSG) strategies often improve LCP scores โ€” the HTML arrives pre-built and the browser can paint immediately.

For ecommerce operators, the LCP element is almost always the primary product image or the hero banner on a category page. Mis-sized images, lazy-loading applied incorrectly to above-the-fold assets, or slow third-party fonts each delay LCP independently of any hydration logic.

How Hydration Works and When It Runs

When a server sends pre-rendered HTML, the browser displays that HTML instantly โ€” that is the paint that LCP captures. After the paint, the browser downloads the JavaScript bundle, parses it, and runs the framework's reconciliation process to attach event listeners to the existing DOM nodes. That reconciliation process is hydration. Until it completes, buttons do not fire, forms do not validate, and cart interactions do not work.

Hydration runs after LCP in the typical page-load timeline. The sequence is: DNS โ†’ TCP โ†’ server response โ†’ first byte (TTFB) โ†’ HTML parse โ†’ LCP paint โ†’ JS download โ†’ JS parse โ†’ hydration โ†’ page fully interactive (TTI). Hydration is therefore a post-paint concern, not a pre-paint one. A slow hydration does not move the LCP timestamp backward โ€” it moves the Time to Interactive forward.

Heavy hydration causes a gap between what users see and what they can do. A shopper sees the 'Add to Cart' button immediately after LCP but cannot click it until hydration finishes. This gap โ€” visible but non-functional UI โ€” is one of the most damaging UX patterns in ecommerce, because it trains users to distrust fast-looking pages.

Where Hydration and LCP Overlap

The two concepts intersect when JavaScript is required to render the LCP element itself. In client-side rendering (CSR) architectures โ€” where the server sends an empty HTML shell and JavaScript builds the DOM โ€” the LCP element does not exist until JavaScript runs. In this case, hydration-adjacent JS execution directly delays LCP, because there is nothing to paint until the framework renders the component tree.

Partial hydration and island architecture strategies can improve both metrics simultaneously. By shipping the hero image as static HTML (improving LCP) and deferring hydration to interactive components like search, cart, or filters (reducing JS parse time), a store reduces both the time-to-first-meaningful-paint and the duration of the non-interactive gap. Next.js, Astro, and Nuxt each offer mechanisms to control which components hydrate eagerly versus lazily.

Practical Priority: Which to Fix First

For most ecommerce stores, LCP is the higher-urgency fix because it directly affects Google's Core Web Vital scores, which influence search ranking signals. A store with a 4-second LCP is losing both conversion rate and organic visibility. Hydration improvements, while critical for conversion, do not appear in Core Web Vitals dashboards in the same direct way.

Fix LCP first by auditing the largest above-the-fold element: ensure it is preloaded with a `<link rel='preload'>` tag, served from a CDN, sized to the viewport, and not blocked by render-blocking scripts. Then address hydration by profiling the JavaScript bundle with browser DevTools, identifying which components trigger long tasks during hydration, and deferring or eliminating hydration for static UI sections.

The diagnostic split is straightforward: if PageSpeed Insights shows a poor LCP score, start with image and server optimization. If Lighthouse shows a large gap between LCP and Time to Interactive (TTI), the hydration bundle is the problem. Both problems can and do exist simultaneously, but they require different remedies applied to different parts of the stack.

Frequently asked questions

Does improving hydration speed improve LCP?

Not directly in server-side rendered or statically generated architectures, because LCP is painted before hydration runs. The exception is client-side rendering, where JavaScript must execute before any DOM element exists to paint. In SSR or SSG setups, LCP and hydration are sequential, not overlapping โ€” fix them with separate techniques.

Can a page have a good LCP score but still feel slow to users?

Yes. A fast LCP means the largest element painted quickly, but if hydration takes several seconds afterward, users see a non-interactive page. Buttons appear but do not respond. This gap between LCP and Time to Interactive is the most common source of user frustration on JavaScript-heavy ecommerce storefronts that use server-side rendering.

What is the difference between hydration and rendering?

Rendering produces HTML markup โ€” either on the server before sending the response, or in the browser via JavaScript. Hydration is specifically the process of taking already-rendered HTML and attaching JavaScript behavior to it. Rendering creates the visual structure; hydration makes it interactive. They are sequential steps, not synonyms.

Which Core Web Vital measures hydration performance?

No Core Web Vital measures hydration directly. Time to Interactive (TTI) captures the end of the main-thread blocking caused by hydration, but TTI is a Lighthouse lab metric, not a field metric in the Core Web Vitals program. Interaction to Next Paint (INP) indirectly reflects hydration quality because slow hydration delays how quickly the page responds to user input.

Is hydration relevant for stores using Shopify's default storefront?

Shopify's Liquid-based themes are primarily server-rendered with minimal framework hydration, so the hydration gap is small. Stores using Hydrogen (Shopify's React-based framework) or headless storefronts built on Next.js or Remix face full React hydration overhead and must actively manage bundle size and selective hydration to avoid large TTI gaps after a fast LCP.

MG
Written by

Matt is the founder of RunOctopus. He built All Angles Creatures from zero to page-1 rankings in reptile feeder insects in under 60 days using exactly this method โ€” turning a hard, entrenched niche into RunOctopus's proof store for programmatic SEO and AI search citation.

Connect on LinkedIn →

See what Otto would build for your store

Free architecture preview. No card required. Five minutes.

Generate Preview →