Skip to main content
Checklist

Hydration Checklist: 12 Items Every Ecommerce Store Should Audit

By ยท Updated ยท 7 min read

Why Hydration Audits Matter for Ecommerce

Hydration is the process by which a JavaScript framework takes server-rendered HTML and attaches event listeners, state, and interactivity on the client side. When hydration fails or runs slowly, users see static pages that don't respond to clicks, broken add-to-cart buttons, and forms that submit nothing. For ecommerce stores, these failures translate directly into lost revenue.

A hydration audit is a structured review of every point where server-rendered markup must match client-rendered output, where JavaScript bundles must load in the right order, and where dynamic data must arrive before the user tries to interact. Running this checklist quarterly โ€” or after any major deployment โ€” catches regressions before they compound into conversion rate drops.

The 12-Item Hydration Audit Checklist

1. SERVER/CLIENT HTML MATCH โ€” Pass: React (or your framework) produces zero hydration mismatch warnings in the browser console on any product, cart, or checkout page. Fail: Console shows 'Text content did not match' or equivalent warnings, indicating the server and client rendered different markup.

2. TIME TO INTERACTIVE (TTI) โ€” Pass: TTI measured in Chrome DevTools or WebPageTest is under 3.5 seconds on a mid-range Android device on a simulated 4G connection for all critical commerce pages. Fail: TTI exceeds 3.5 seconds, meaning users can see the page but cannot interact with it during that window.

3. ADD-TO-CART BUTTON RESPONSIVENESS โ€” Pass: Clicking 'Add to Cart' within the first two seconds of page load triggers the correct action with no delay or double-submission. Fail: Button is unresponsive, triggers multiple submissions, or throws a JavaScript error during the hydration window.

4. JAVASCRIPT BUNDLE LOAD ORDER โ€” Pass: Framework runtime and hydration scripts load before any user-interaction events fire, confirmed via the Network waterfall in DevTools. Fail: Interaction scripts load after deferred or lazy-loaded bundles cause a race condition, visible as event handlers not attached when the page first renders.

5. CART STATE PERSISTENCE โ€” Pass: Cart item count in the header matches the actual cart contents immediately on page load without a visible flash from zero to the correct number. Fail: Cart icon shows zero or a stale count for any measurable duration after the page becomes visible, indicating hydration has not yet restored client state.

6. DYNAMIC PRICE AND INVENTORY DATA โ€” Pass: Prices and stock indicators rendered server-side match the values fetched client-side within 500ms of hydration completing, with no visible swap. Fail: Users see a price or 'In Stock' label that flickers or changes after the page loads, indicating a mismatch between SSR data and client fetch results.

7. THIRD-PARTY SCRIPT INTERFERENCE โ€” Pass: Analytics, chat, and review widgets load after the core hydration cycle completes and do not delay TTI beyond the 3.5-second threshold. Fail: Lighthouse or WebPageTest identifies a third-party script as a long task that blocks the main thread during the hydration window.

8. PROGRESSIVE ENHANCEMENT FOR JS FAILURES โ€” Pass: Core browse and search functions work with JavaScript disabled or blocked, confirmed by testing in a browser with JS turned off. Fail: Product listings, search results, or navigation are completely blank or non-functional without JavaScript, meaning there is no server-rendered fallback.

9. SELECTIVE / PARTIAL HYDRATION IMPLEMENTATION โ€” Pass: Static page sections (hero banners, editorial content, footer) are not hydrated at all, confirmed by checking that no event listeners are attached to those DOM nodes in DevTools. Fail: Every component on the page is hydrated regardless of whether it needs interactivity, inflating JavaScript execution time unnecessarily.

10. ERROR BOUNDARY COVERAGE โ€” Pass: Every interactive component (cart, wishlist, review form) is wrapped in an error boundary so a hydration failure in one component does not crash the entire page. Fail: A single component hydration error triggers a full white-screen failure, confirmed by deliberately injecting a bad prop in a staging environment.

11. CUMULATIVE LAYOUT SHIFT (CLS) DURING HYDRATION โ€” Pass: CLS score is below 0.1 on all commerce page templates as measured by Core Web Vitals in Search Console or a lab test. Fail: Elements shift position as hydration restores client-side state โ€” commonly seen when skeleton loaders are replaced by actual content with different dimensions.

12. HYDRATION COVERAGE ON EDGE / CDN CACHED PAGES โ€” Pass: Pages served from CDN edge nodes hydrate correctly with live cart and session data, confirmed by testing from at least two geographically distinct locations. Fail: Edge-cached HTML contains stale personalization or cart data that conflicts with client-side hydration, causing visible state mismatches for returning users.

How to Run Each Check Efficiently

Checks 1, 3, 4, and 10 are best run in Chrome DevTools with the Console, Network, and Performance panels open simultaneously on a throttled connection. Reproduce the check on your actual production URL, not a localhost build, because CDN caching and edge logic change hydration behavior significantly.

Checks 2, 7, and 11 are measurement checks best handled with WebPageTest using a real device profile. Export the filmstrip view for CLS checks so you can pinpoint the exact frame where layout shift occurs. Checks 5, 6, 8, 9, and 12 require scripted test scenarios โ€” use Playwright or Cypress to automate them so they run on every deployment rather than manually.

Common Failure Patterns and Their Root Causes

Mismatch errors (Check 1) almost always stem from server and client reading different data sources โ€” a server pulling from a database snapshot while the client fetches from a live API. Fixing this means ensuring the initial data passed to the client during SSR is identical to what the client would fetch on its own.

CLS during hydration (Check 11) is frequently caused by image dimensions not being specified in the server-rendered HTML, so the browser reserves no space until the image loads and hydration fires. Setting explicit width and height attributes on all product images in the SSR output resolves the majority of ecommerce CLS failures. Cart state flashes (Check 5) are solved by reading cart data from a cookie or localStorage before the first render, not after hydration completes.

Turning Audit Failures into a Prioritized Fix Queue

Not all failures carry equal revenue risk. Prioritize failures on Checks 3, 5, and 6 first โ€” add-to-cart responsiveness, cart state, and price accuracy directly block or mislead purchasing decisions. Failures on Checks 2 and 7 come next because they affect all users on slower connections. Checks 8, 9, and 10 are resilience improvements that reduce tail-risk rather than affecting every session.

Assign each failed check a severity tag (Critical, High, Low), a responsible engineer, and a deadline before closing the audit. Treat this checklist as a living document: add platform-specific checks as your stack evolves, and re-run the full audit after any framework upgrade, new third-party script addition, or significant template change.

Frequently asked questions

How often should an ecommerce store run a hydration audit?

Run the full 12-item audit after every major deployment, framework version upgrade, or addition of a new third-party script. For stores on a continuous deployment cycle, automate the measurable checks (TTI, CLS, mismatch warnings) as part of the CI/CD pipeline and run the full manual audit quarterly at minimum.

What is a hydration mismatch and why does it break ecommerce pages?

A hydration mismatch occurs when the HTML rendered on the server differs from what the JavaScript framework renders on the client. The framework discards the server HTML and re-renders from scratch, causing a flash of incorrect content and delaying interactivity. On ecommerce pages, this frequently corrupts price displays, cart counts, and form states.

Is selective hydration only relevant for large enterprise stores?

No. Any store with static content sections โ€” banners, editorial copy, footer โ€” benefits from selective hydration regardless of catalog size. Hydrating only interactive components reduces JavaScript execution time on every page load. A 50-SKU store with a heavy page template gains the same proportional TTI improvement as a million-SKU catalog.

Can a CDN cache break hydration for returning customers?

Yes. If a CDN caches a fully server-rendered page that includes user-specific data (cart count, recommended products), a returning user receives stale HTML that conflicts with the client-side hydration state. The fix is to either exclude personalized fragments from CDN caching or use edge-side includes to inject dynamic segments after serving the cached shell.

What is the difference between a hydration failure and a JavaScript error?

A JavaScript error is any runtime exception in client-side code. A hydration failure is a specific class of error where the framework cannot reconcile server-rendered HTML with its own virtual DOM during the attachment phase. Hydration failures manifest as mismatch warnings, component re-renders, or white screens when error boundaries are absent โ€” not all JavaScript errors are hydration failures, but all hydration failures produce JavaScript-level symptoms.

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 →