Skip to main content
Glossary

Hydration

By ยท Updated
Quick definition

The browser-side process of attaching JavaScript event handlers to server-rendered HTML โ€” the source of most INP regressions on modern ecommerce stores.

Hydration in plain English

When a server-rendered page arrives in the browser, the HTML is already there and rendered to screen, but it's static โ€” clicks don't work, form inputs don't respond, dynamic state isn't tracked. Hydration is the process of the framework (React, Vue, Svelte) walking the DOM, attaching event listeners, and reconnecting the client-side state model. Until hydration completes, the page is visible but uninteractive.

Hydration sounds invisible but it's the single biggest INP killer on modern stores. A user lands on a server-rendered product page that paints in 0.8 seconds โ€” looks instant. But if hydration takes another 2 seconds (parsing 800KB of JS, rebuilding the React component tree, attaching thousands of listeners), the first click during that window blocks the main thread and feels like the page is broken.

The newer patterns address this. Partial hydration (Astro, Marko) only hydrates interactive components and leaves the rest as static HTML โ€” most product pages are 80% static content that doesn't need JS. Streaming SSR (React 18, Next.js App Router) sends HTML in chunks so hydration can start before the full page arrives. Selective hydration prioritizes the components users actually interact with first.

Diagnostic flow: open Chrome DevTools Performance panel, record a page load, look at the main thread between First Contentful Paint and Time to Interactive. Long yellow bars are JavaScript blocking the thread โ€” that's hydration cost. Tools like Web Vitals extension and Lighthouse will report INP issues that trace back to hydration when the metric exceeds 200ms.

Why hydration matters for ecommerce

For ecommerce, hydration cost is what makes "fast" sites feel slow. Your product page paints in under a second but users can't tap Add to Cart for another 1.5 seconds because hydration is still chewing through React. That feels broken. The fix is architectural: reduce client-side JS, lazy-load non-critical components, use frameworks that hydrate selectively. Every megabyte of JS you ship is hydration cost paid by every visitor. The biggest gains come from auditing what actually needs to be interactive on a product page โ€” usually a tiny minority of the component tree.

Deeper dives on this term

Focused pages that go deeper than the definition โ€” comparisons, platform-specific guides, operational walkthroughs.

Compare

Hydration vs Core Web Vitals: What's the Difference?

Hydration vs Core Web Vitals: clear definitions, mechanic differences, overlap points, and what ecommerce teams should optimize fi

Read →
Compare

Hydration vs INP (Interaction to Next Paint): What's the Difference?

Hydration vs INP: understand the exact difference, where they overlap, and which to fix first for faster ecommerce storefronts.

Read →
Compare

Hydration vs JavaScript SEO: What's the Difference?

Hydration and JavaScript SEO are related but distinct. Learn how each works, where they overlap, and which one to prioritize for y

Read →
Compare

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

Hydration vs LCP: understand what each measures, how they interact, and why optimizing one without the other leaves real ecommerce

Read →
Compare

Hydration vs Mobile-First Indexing: What's the Difference?

Hydration vs Mobile-First Indexing: clear definitions, mechanical differences, and how both affect ecommerce SEO and crawlability.

Read →
Platform

Hydration for Shopify Stores

How hydration works specifically on Shopify stores โ€” platform limits, theme architecture, app tools, and workarounds for faster in

Read →
Platform

Hydration for Wix Stores

How hydration works on Wix stores, what Wix's rendering pipeline does differently, and which tools and workarounds matter for ecom

Read →
Platform

Hydration for WooCommerce Stores

How hydration works in WooCommerce stores, which plugins handle it, platform-specific limits, and workarounds for cart, checkout,

Read →
How-to

How to implement hydration for an Ecommerce Store

A step-by-step operational guide to implementing hydration for your ecommerce store โ€” from audit to deployment, with concrete acti

Read →
Checklist

Hydration Checklist: 12 Items Every Ecommerce Store Should Audit

Audit your ecommerce store's hydration with 12 specific checks. Each item includes clear pass/fail criteria to find and fix client

Read →

Frequently asked questions

What's the difference between hydration and rendering?

Rendering is producing the HTML โ€” happens on the server before the page is sent. Hydration is making that HTML interactive โ€” happens in the browser after the page loads. A page can be fully rendered (visible to the user) but still un-hydrated (clicks don't work yet). The gap between visible and interactive is hydration time.

Why is hydration expensive for performance?

The browser has to download the framework JS, parse it, instantiate every component, attach event listeners to every interactive element, and reconcile the in-memory virtual DOM with the actual DOM. On a typical e-commerce product page, that's hundreds of components and thousands of operations on the main thread, all blocking user input.

What is 'partial hydration' or 'islands architecture'?

Both names for the same idea: instead of hydrating the entire page, only hydrate the parts that actually need to be interactive (the cart button, the size selector, the image zoom). The rest stays as static HTML. Astro and Marko popularized this. For a product page that's 80% static content, partial hydration can cut JS bundle size by 90% and eliminate most INP issues.

Does using a framework like Next.js help with hydration costs?

Newer Next.js (App Router with React Server Components) can dramatically reduce hydration cost because Server Components render on the server and never ship to the client โ€” they have zero hydration cost. But naive Next.js apps using only Client Components hydrate everything and can be as slow as a pure SPA. The framework helps if you use it correctly; the architecture choice matters more than the framework name.

How do I reduce hydration cost without rewriting my whole site?

Three concrete wins: (1) Lazy-load any component not visible on initial load ("below the fold" โ€” reviews section, related products, footer widgets). (2) Use dynamic imports for heavy interactive components (image zoom, chat widget) so they only hydrate when invoked. (3) Replace JS-heavy components with simpler HTML where possible โ€” does the size selector really need React, or could it be a <select>?

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 →