Headless browsers are real browsers without a window, driven by code. Puppeteer and Playwright made them easy to script, and they power testing, monitoring, scraping and, more and more, AI agents. Because they run a genuine browser engine, they execute JavaScript, pass simple bot checks and render pages exactly like a user’s browser.
Detecting them used to mean finding a single tell. Now it means finding contradictions.
The old tells
For years, a handful of checks caught most automation:
navigator.webdriver, which the WebDriver standard sets totruewhen a browser is under automation.- The user agent. Old headless Chrome announced itself as
HeadlessChrome. - Missing pieces. No plugins, no languages, odd permission states, a window with zero outer size.
- Framework artifacts. Variables and bindings that automation drivers injected into the page.
All of these still catch unmodified scripts, and plenty of unmodified scripts are still out there. But each one is a single value, and a single value is easy to patch. Stealth plugins and patched drivers remove them all.
What changed
Two things moved detection on.
New headless mode. Chrome rebuilt headless mode so that it runs the same code as regular Chrome. Since Chrome 132, the old headless implementation is no longer in the main Chrome binary and ships separately as chrome-headless-shell. The new mode has no separate rendering path to give it away.
Anti-detect tooling. Commercial anti-detect browsers and open-source stealth patches rewrite dozens of values to match a chosen device profile, and some automation frameworks avoid the DevTools protocol features that used to leave traces.
Detection by contradiction
A patched browser can make any single value look right. It is much harder to make every layer tell the same story. Modern detection collects many independent observations and looks for disagreement:
- Network against browser. The TLS and HTTP/2 fingerprints must match the browser the user agent claims to be. See TLS fingerprinting.
- User agent against everything else. Client hints,
navigator.platform, available fonts, codecs and the GPU must all fit the claimed operating system and device. - Graphics. Servers usually have no GPU, so they render WebGL in software (SwiftShader, llvmpipe). A “gaming laptop” rendering in software is a contradiction.
- Page against worker. Spoofing often patches the main page and forgets web workers and iframes, which report the original values.
- Native function integrity. Overwritten browser functions behave subtly differently from built-in ones, and the differences can be measured.
- Automation side effects. Driving a browser through the DevTools protocol has observable side effects that a normal session doesn’t produce.
No single check decides. Each adds evidence, and the score comes from how many independent layers disagree. The browser fingerprint test runs these consistency checks on your own browser, so you can see what a headless or stealth setup gives away.
Behavior
Some automation is good enough to survive every environment check, for example a real, unmodified browser on a real machine with a script clicking through it. What it does next is harder to hide:
- Pointer movement. People overshoot, correct and move in curves. Scripts teleport, or move in straight lines at constant speed.
- Typing cadence. Human key timing is uneven and depends on which keys are pressed. Pasted or scripted input isn’t.
- Navigation. Scripts go straight to the target page at a regular rhythm, skipping the pages a person would read.
- Velocity. One device, many accounts. One account, many devices. Ten thousand sessions with an identical environment.
Behavior is also where credential stuffing and fake signups show up most clearly, because the automation is doing something no customer would.
AI agents
AI agents changed the question. An assistant fetching a page for a user, a crawler gathering training data and an autonomous agent completing a purchase can all run real browsers, and all would fail a naive bot check in the same way. But you probably want to treat them differently.
Two developments help:
- Declared identity. Major operators publish the user agents and IP ranges of their crawlers and agents.
- Cryptographic verification. Web Bot Auth, built on HTTP Message Signatures (RFC 9421), lets an agent sign its requests with a key published by its operator. A user agent string is only a claim, while a valid signature proves who sent the request.
A sensible policy treats verified agents as known automation, allows or limits them per action, and is stricter with anything that claims to be an agent without proving it, because that’s the identity worth faking.
Where to go from here
Bot management vendors differ a lot in how much of this they do and where they do it. Some lean on edge and network signals, some on a client-side sensor, some on challenges. The layer strip on the vendor list shows which layers each vendor documents publicly, and the buyer’s guide covers how to test them on your own traffic.