Hydration is the process by which client-side JavaScript attaches behavior to HTML that was already rendered, often on the server. A page may therefore contain readable HTML before the browser finishes initializing its interactive components.
Why it matters when collecting pages
If the first response includes the target text, a parser may not need to wait for hydration. If the page renders only a shell or fills fields after JavaScript runs, a browser may be necessary. Inspect the raw HTML and network requests first; this reveals whether the data is already present or arrives later from an API.
Hydration can cause timing issues in automation. Waiting for the document’s load event may be too early for a particular component, while waiting for all network activity to stop may never finish on pages with analytics or long-polling. Wait for a specific selector or state that corresponds to the content you need.
Framework behavior varies, so avoid relying on internal hydration scripts as a stable data interface. Prefer documented endpoints or semantic page content where available.
Leave a Reply