browser

JavaScript Rendering

The process of executing a page's JavaScript in a browser engine before extracting content, required for React, Vue, and Angular SPAs.

JavaScript rendering is the step of launching a real browser engine, loading the target page, waiting for all JavaScript to execute, and only then extracting the final DOM. It is necessary for any site that builds its content client-side — which is the majority of modern web applications.

When a framework like React renders on the client, the initial HTML response is a near-empty `<div id="root">` container. The JavaScript bundle downloads, executes, fetches data from APIs, and updates the DOM — all happening in the browser after the initial HTML load. A standard HTTP scraper receives only the empty shell. JavaScript rendering waits for the full lifecycle to complete before extracting.

The performance cost is real: rendering a page takes 2-10x longer than a plain HTTP fetch and consumes far more CPU and memory. AlterLab's intelligent tier selection runs JavaScript rendering only when the site requires it — plain HTTP is attempted first when possible, falling back to rendering only when the response lacks expected content.

What is JavaScript Rendering?

The process of executing a page's JavaScript in a browser engine before extracting content, required for React, Vue, and Angular SPAs.

How does AlterLab handle JavaScript Rendering?

The performance cost is real: rendering a page takes 2-10x longer than a plain HTTP fetch and consumes far more CPU and memory. AlterLab's intelligent tier selection runs JavaScript rendering only when the site requires it — plain HTTP is attempted first when possible, falling back to rendering only when the response lacks expected content.

Examples

# Activate JavaScript rendering
{
  "url": "https://react-app.com/products",
  "render_js": true,
  "wait_for": ".product-grid"
}

Related Terms

Extract JavaScript Rendering data from any website

AlterLab returns clean, structured data from any public URL — no scraper infrastructure needed. Start free, no credit card required.

View API docs

Your first scrape.
Sixty seconds.

$1 free credit — up to 5,000 scrapes. No credit card.Just a POST request.

terminal
curl -X POST https://api.alterlab.io/v1/scrape \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "formats": ["markdown"]}'

No credit card required · $1 free credit, up to 5,000 scrapes · Balance never expires