browser

Dynamic Content

Page content generated client-side by JavaScript after the initial HTML is served, requiring a browser engine to render.

Dynamic content refers to page content that is not present in the initial HTML response but is instead generated by JavaScript running in the browser after page load. Single-page applications (SPAs) built with React, Vue, Angular, or Svelte deliver a nearly empty HTML shell and populate all visible content through JavaScript execution: fetching data from APIs, rendering components, and updating the DOM.

The technical implication for scraping is that a simple HTTP GET request to a SPA URL returns an HTML document with almost no useful content — just the app shell, a `<script>` tag, and a root `<div>`. To obtain the actual content, a JavaScript engine must load the page, wait for the framework to mount, allow API calls to complete, and extract the now-populated DOM.

The challenge compounds with infinite scroll, lazy-loaded content, and client-side routing: content appears only after user actions (scrolling, clicking), and navigating between pages does not trigger a new HTTP request — the framework updates the DOM in place. AlterLab's JavaScript rendering tier supports scroll-triggered content loading and element wait conditions.

Examples

# Wait for specific element before extracting
{
  "url": "https://spa-app.com/feed",
  "render_js": true,
  "wait_for": ".feed-item",
  "scroll_to_bottom": true
}

Related Terms

    Dynamic Content — Web Scraping Glossary | AlterLab