```yaml
product: AlterLab
title: "Headless Chrome — Web Scraping Glossary | AlterLab"
comparison_context: "AlterLab is an alternative to Firecrawl, ScrapingBee, and Bright Data."
source_url: https://alterlab.io/glossary/headless-chrome
```

browser

# Headless Chrome

Headless Chrome runs the Chrome browser without a graphical user interface, enabling automated page rendering, JavaScript execution, and screenshot capture from a server.

Chrome's `--headless` flag launches the browser without rendering to a screen, consuming far less memory and CPU than a full graphical session. Headless Chrome exposes the Chrome DevTools Protocol (CDP), which allows external programs to control page navigation, inspect the DOM, intercept network requests, execute JavaScript, and capture screenshots.

Playwright and Puppeteer are the dominant libraries for controlling headless Chrome programmatically. They wrap CDP in a high-level API and handle browser lifecycle management, page context isolation, and event waiting. Some libraries (Playwright) can also drive Firefox and WebKit in headless mode.

Detection of headless Chrome is a cat-and-mouse game: anti-bot systems look for tells such as missing `window.chrome` properties, specific navigator attributes set by headless mode, or WebGL rendering differences. Stealth patches (puppeteer-extra-plugin-stealth, Playwright's maskFingerprintingScripts) override these properties to make the headless browser indistinguishable from a real user's Chrome.

### What is Headless Chrome?

Headless Chrome runs the Chrome browser without a graphical user interface, enabling automated page rendering, JavaScript execution, and screenshot capture from a server.

### How does AlterLab handle Headless Chrome?

Detection of headless Chrome is a cat-and-mouse game: anti-bot systems look for tells such as missing `window.chrome` properties, specific navigator attributes set by headless mode, or WebGL rendering differences. Stealth patches (puppeteer-extra-plugin-stealth, Playwright's maskFingerprintingScripts) override these properties to make the headless browser indistinguishable from a real user's Chrome.

## Examples

```
# Launch headless Chrome via Playwright CLI
playwright codegen https://example.com
# Or programmatically:
from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(headless=True)
    page = browser.new_page()
    page.goto("https://example.com")
    print(page.title())
    browser.close()
```

## Related Terms

[Headless BrowserA web browser that runs without a graphical user interface, executing JavaScript and rendering pages exactly as a real browser would.](https://alterlab.io/glossary/headless-browser)[PlaywrightAn open-source browser automation library from Microsoft that controls Chromium, Firefox, and WebKit through a unified async API.](https://alterlab.io/glossary/playwright)[PuppeteerA Node.js library providing a high-level API to control Chrome or Chromium over the DevTools Protocol, commonly used for scraping JavaScript-heavy sites.](https://alterlab.io/glossary/puppeteer)[JavaScript RenderingThe process of executing a page's JavaScript in a browser engine before extracting content, required for React, Vue, and Angular SPAs.](https://alterlab.io/glossary/javascript-rendering)[Stealth ModeBrowser automation patches that normalise headless browser signals to match genuine user browser profiles and navigate browser environment checks.](https://alterlab.io/glossary/stealth-mode)

## Extract Headless Chrome 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](https://alterlab.io/docs/api/rest)

[Back to Glossary](https://alterlab.io/glossary)