What is JavaScript Rendering?
JavaScript rendering is the process where a browser executes JavaScript code to build and display the final content of a web page. For scrapers and automation tools, this means the raw HTML from the server is not enough — you need a browser engine to see the actual content.
Why raw HTML is not enough
When you fetch a page with requests.get() or curl, you get the server's initial HTML response. For traditional websites, this contains all the content. But modern JavaScript-heavy sites (React, Vue, Angular, Next.js in CSR mode) return a minimal HTML shell:
The actual content — product listings, prices, articles, user data — only appears after the browser downloads and executes the JavaScript bundle. A simple HTTP scraper sees an empty div. A headless browser sees the full page.
CSR vs SSR vs SSG
Client-Side Rendering (CSR)
The browser downloads a minimal HTML page and a JavaScript bundle. JS runs in the browser to fetch data and build the DOM. Examples: React SPAs, Vue SPAs, Angular apps.
Server-Side Rendering (SSR)
The server runs JavaScript on every request and sends fully-rendered HTML to the browser. Examples: Next.js (with getServerSideProps), Nuxt.js, Remix.
Static Site Generation (SSG)
All pages are pre-rendered to static HTML at build time. The HTML files are served directly, no server-side execution per request. Examples: Next.js static export, Gatsby, Astro.
How headless browsers solve JS rendering
A headless browser is a full browser engine (Chromium, Firefox) that runs without a visible window. It downloads the page, executes JavaScript, renders CSS, processes AJAX requests, and produces the exact same DOM you would see in a regular browser.
The most popular headless browser tools are Puppeteer (Chrome/Chromium, Node.js), Playwright (Chrome, Firefox, WebKit; Node.js and Python), and Selenium (multiple browsers, multiple languages). All three let you load pages, wait for JavaScript to finish, and extract the rendered DOM.
The downside: managing headless browsers at scale is complex. You need to handle browser crashes, memory leaks, concurrent sessions, proxy rotation, and Cloudflare challenges. This is exactly what SnapRender abstracts away — you send a URL and get back the rendered result.
Self-managed
Run Puppeteer/Playwright on your own servers. Full control, but you handle scaling, crashes, and anti-bot.
Browser-as-a-service
Services like Browserless provide remote browser instances. You write the automation code, they manage the infra.
Rendering API
SnapRender handles everything. Send a URL, get back HTML, screenshot, PDF, or extracted data. Zero browser management.
Frequently asked questions
JavaScript rendering is the process where a browser (or headless browser) executes JavaScript code on a web page to produce the final, visible HTML. Many modern websites load content dynamically with JavaScript — meaning the initial HTML is nearly empty and only fills in after JS runs.
Tools like Python's requests or cURL only download the raw HTML returned by the server. They do not execute JavaScript. If a page uses React, Vue, or Angular to render content client-side, the raw HTML contains empty divs or loading spinners — the actual data never appears.
Client-Side Rendering (CSR) builds the page in the browser with JavaScript. Server-Side Rendering (SSR) builds the HTML on the server for each request. Static Site Generation (SSG) builds all pages at build time into static HTML files. SSR and SSG are scraping-friendly; CSR requires a headless browser.
A headless browser is a web browser without a visible GUI. It runs in the background, executes JavaScript, renders CSS, and produces the full DOM — just like Chrome or Firefox — but programmatically. Puppeteer, Playwright, and SnapRender all use headless browsers under the hood.
SnapRender runs a pool of headless Chromium browsers. When you send a URL to any endpoint, the browser loads the page, executes all JavaScript, waits for the DOM to stabilize, and then returns the result (screenshot, PDF, HTML, or extracted data). You get the fully-rendered page without managing browsers yourself.
Learn more
What is a Headless Browser?
Deep dive into headless browsers, how they work, and when to use them.
Headless Browser Guide
Complete guide to headless browsers with Puppeteer and Playwright examples.
Puppeteer vs Playwright
Feature comparison of the two most popular headless browser tools.
Scraping API
Let SnapRender handle JavaScript rendering — get clean data from any URL.
Skip the headless browser headaches.
SnapRender renders JavaScript for you. Send a URL, get back the fully-rendered page. Start free.
Start Free — 100 requests/month