Headless browser: what it is and what it leaves in your requests

A headless browser is a full browser with the window removed, steered by code instead of a hand on a mouse. Developers use it all day for tests and rendering, and bot operators use it because it runs your JavaScript like any visitor would. Its traces in your requests are real, but every one of them can be changed by whoever runs the browser.

Section Bots Updated Traces three

Quick facts

What it is
A browser run without a visible window, per Chrome's headless documentation
Controlled through
W3C WebDriver, or the Chrome DevTools Protocol
Page-side flag
navigator.webdriver, reported by cooperating browsers
Detection status
Signal, never proof: the operator controls much of what it shows

What a headless browser is

A headless browser loads pages, runs their scripts and builds the document the way a normal browser does. It simply does not paint a window. Chrome describes its headless mode as a way to run the browser in an unattended environment, without any visible UI, and the point of the arrangement is that a program, not a person, is at the controls.

Chrome and Firefox without a window

Chrome now shares its headless and windowed modes in one implementation. The older mode was a separate browser implementation; from Chrome 132 it ships only as a standalone binary, chrome-headless-shell, according to the same Chrome page. That matters for you in one way: current headless Chrome is built from the same code as the Chrome your visitors run, so there is less that is different about it than there once was.

Firefox is driven the same way. Puppeteer controls Chrome or Firefox, and Playwright runs Chromium, Firefox and WebKit headless by default when it runs tests.

How a program steers it

Two interfaces do most of the work. WebDriver is, in the words of the specification, a remote control interface that enables introspection and control of user agents; Selenium implements it. The Chrome DevTools Protocol, which Puppeteer uses alongside WebDriver BiDi, is the other. Either way the script says "open this address, wait for that element, read this value", and the browser does it.

The result is a client that is a genuine browser underneath and a program on top.

Legitimate uses

Most headless browsers that touch your site are not attacking it. Playwright's documentation says its test runner runs headless by default, so every team that tests a web application this way produces headless traffic. Three uses account for most of what you will see:

  • Testing. A pipeline opens your staging site or your production login page and checks that it still works after a release.
  • Rendering. Turning a page that builds itself in JavaScript into a finished document or an image, for previews, reports or PDFs.
  • Monitoring. A scheduled script loads a page from outside your network and tells someone when it breaks. If the owner of that script is you or a vendor you hired, you want it to get through.

These clients are the reason a rule such as "refuse anything that looks headless" does damage. The same request comes from your uptime check and from a copy job, and you can only sort them by who you expect to see, which is a job for filtering exceptions rather than for a detector.

Why bots use one

A script that fetches HTML with an HTTP library gets the markup and nothing the page builds afterwards. Many sites now build their content in the browser, and some check, before showing anything, that the client ran a script. A client that cannot execute JavaScript fails those pages and those checks.

A headless browser does not fail them. It executes the scripts, accepts the cookies the scripts set, follows the redirects and ends up with the same document a visitor would. For someone collecting content at scale, that removes the problem of pages that do not work without a browser, and it makes simple "does this client run JavaScript" tests useless as a filter.

It costs the operator more than a plain script does. A browser uses far more memory and time per page, so it tends to be used where the pages demand it. Where the target is a catalogue that renders in the browser, how that sweep looks on your side is described under data scraping bots; the same tooling also turns up in the abuse covered on the bots hub.

What it leaves in your requests

Three kinds of trace are worth knowing. Each describes a tendency, not a guarantee.

TraceWhere you see itWhy it is only a signal
navigator.webdriverIn the page's own JavaScriptA cooperating browser sets it; the operator can change what it reports
Claim against behaviourUser-Agent header compared with what the client doesThe header is free text; behaviour can be tuned
No human timingRequest sequences across a sessionPauses can be added; patient automation looks slow

navigator.webdriver

The WebDriver specification defines a flag that is true when the user agent is under remote control, and exposes it to pages as navigator.webdriver. MDN describes it as a standard way for co-operating user agents to inform the document that it is controlled by WebDriver, and lists the Chrome conditions that turn it on, including the --headless flag. The word that matters is cooperating. The browser reports its own state, and a client that does not want to be read can report something else.

It also lives in the page, not in the request. A server that only reads headers never sees it. It reaches you only if your own page script reads the value and sends it back, and then it arrives as one more claim from the client.

What the client says against what it does

The user agent is the client's own description of itself, and as covered on user agent it proves nothing alone. The useful part is the contradiction: a client that names a current browser while requesting pages like a script, or one whose headers do not look like the browser it names. Disagreement between the claim and the rest of the request is worth a closer look; agreement is worth very little.

No pauses, no wandering

A person reads, scrolls, goes back, leaves a tab open and returns. A program on a task requests the next address when the last one finishes. Across many requests that shows up as even spacing, no idle time and a path through the site that follows a list rather than its links. It is the strongest of the three, because it needs no cooperation from the client. It also needs volume: a few requests say little, and the layer is described among the signals on bot detection.

Signals, not proof

Each trace above is a property of how a particular tool is configured. Automation is software, and software can be configured differently. A flag a browser sets can be changed, a header can be written to say anything, and timing can be slowed to look unhurried. How that is done is not covered here, and you do not need the details to defend a site; what you need is to know that none of these will hold up as a verdict.

Two things make the position weaker over time. First, headless Chrome shares its implementation with the windowed browser, as noted above, so many of the differences that once gave it away have little reason to persist. Second, a real browser produces real browser characteristics, which is the limit already noted for client characteristics on the detection page.

Honest detection therefore sounds like this: some automation is easy to spot, because its operator never tried to hide it, and you will catch that. Automation that was set up with care passes the individual checks, and the remaining evidence is what it does over time. A rule that treats a single trace as proof will refuse people. Browsers in unusual setups, assistive tools and some privacy-focused configurations all depart from the expected pattern for ordinary reasons, and they bear the cost.

Weigh the traces together and let the response scale with confidence, as laid out on bot detection. A challenge such as a CAPTCHA is a fair response to medium confidence, since it costs a person a moment and costs a bulk operation per request. Address history is a separate input, covered under IP reputation, with its own failure modes.

Where a WAF helps and where it does not

A filter at the edge sees requests: the address, the headers, the path, the rate. It does not run your page's JavaScript and cannot read navigator.webdriver unless your own code reports it. Whether the client behind a request is a headless browser is not something it can establish. What it can see is how that client behaves against your site.

That is enough for the part that matters. Bridge WAF applies rate limiting per domain, so a sweep that pushes past the limit is refused at the edge instead of reaching your application, whatever tool runs it. The WAF has three modes. In off nothing is limited or recorded. In monitor the activity log records which requests a rule would have refused, and nothing is refused. In block they are refused. Begin in monitor, read the log, and look for your own tests, uptime checks and partner integrations among the clients the rule would have caught; add exceptions for the ones you expect before you switch it on, and see false positives for how to sort the rest.

What it does not do is tell you which headless clients you mind. Your staging test and a competitor's copy job can produce the same traffic and call for opposite answers, and that is a decision about your business. Where the demand is real, an interface with a key serves it better than an arms race, as argued on blocking bad bots. See what the platform offers at Bridge CDN.

Questions

What is a headless browser?

A headless browser is a web browser that runs without a visible window, controlled by a program instead of a person. It loads pages, runs their JavaScript and builds the page like any browser, but nothing is drawn for someone to look at. Chrome and Firefox both have such a mode, and test frameworks use it by default.

Is a headless browser a bot?

No. The browser is a tool, and most of its use is ordinary: running tests, rendering pages, checking that a site works. It becomes a bot when a program uses it to visit your site at scale for a purpose you did not agree to. Nothing in a single request tells you which of the two you are looking at. The tooling behind data collection is described under data scraping bots.

Can a site tell that a visitor is using a headless browser?

Sometimes. The navigator.webdriver property reports automation to cooperating browsers, and a mismatch between the user agent a client claims and how it behaves can stand out. None of these traces is reliable on its own, because whoever runs the browser controls much of what it reports. Treat each as one signal among several.

Should I block headless browsers?

Not as a category. Your own monitoring and tests, and some partners, may use one. Block on behaviour you have measured, such as request volume or paths no visitor would take, and start in monitor mode so the activity log shows what a rule would have refused before it refuses anything.

Does a headless browser get past a CAPTCHA?

It can load the challenge page, because it is a real browser, but loading a challenge and solving it are different things. A challenge adds cost for every client that meets it, and automation that finds your pages valuable enough may pay that cost. A challenge slows bulk access; it does not end it.