Headless browser: a real browser with no window, driven by code
A headless browser does for a program what a browser does for a person. It runs the page’s scripts, keeps cookies, fills in forms and takes screenshots.
A headless browser is a web browser with no visible window, driven by code that loads pages, clicks, types and reads the result. Chrome runs headless with the --headless flag, and libraries such as Puppeteer and Selenium drive it for testing, scraping and AI agents.
On this page
How a headless browser works
Chrome’s documentation describes headless mode as running the browser in an unattended environment, without any visible UI. You start it by passing --headless to Chrome. Since Chrome 112, headless Chrome creates the browser’s windows without displaying them, and headless and on-screen Chrome are one browser. Since Chrome 132 the older headless mode ships separately, as chrome-headless-shell.
A program then drives it through a library such as Puppeteer or Selenium. A typical script opens a URL and waits for the page to load. It then fills in a form, clicks a button and reads the text or saves a screenshot.
What teams use a headless browser for
- Testing: engineers run their own sign-up and checkout on every release.
- Scraping: data teams use one for web scraping pages that build themselves with JavaScript, which a plain request can’t read.
- Agents: an AI model gets a browser so it can act on sites that have no API.
Hosted services run them for you. Browserbase, for example, offers fleets of headless browsers at scale, each in an isolated session.
What a headless browser session keeps
A session lasts as long as the code runs. When it ends, the page it read is gone unless the program saved it. Nothing arrives in between either, so the welcome email and the renewal notice go unseen. Staying a customer of a company for months takes an inbox, a phone number and a reason to come back.
Obsession collects what companies show only to customers, step by step: their screens, emails and texts, member prices, trial limits, quotes and cancel offers, each dated with a screenshot. Teams and AI agents look up any company through the API or MCP, and a company not yet covered is added on request. Each account keeps its own inbox and stays open for months, so what a company sends between visits is kept too. Obsession vs Browserbase sets the two side by side.
It is a tool a bot can use. Standards such as Web Bot Auth let an automated visitor sign its requests, so a site can tell which company’s agent it is.
Web Bot Auth, definedOnly when the page builds its content with JavaScript or needs clicks and form entries first. A plain HTML page can be read with a simple request.
Since Chrome 112, headless mode runs the same Chrome, creating its windows without showing them. The older, separate headless browser is now shipped as chrome-headless-shell.
Sources
In the order the page cites them. Every page was read on 11 Nov 2026.