Headless Browser Detection

TLDR: Headless browser detection identifies browsers running without a visible interface or under automation control, by looking for the environmental differences that automation introduces.

Headless browser detection targets the gap between a browser a person is using and a browser a program is driving. A headless browser is a real browser engine running without a window, controlled through a protocol rather than a mouse. It executes JavaScript, renders layout, and handles cookies exactly like its visible counterpart, which is why it defeats detection methods aimed at simple HTTP clients. What it cannot fully hide is the automation environment around it.

Signals Detection Systems Check:

  1. Automation flags: The navigator.webdriver property is set to true by browsers under automation control unless explicitly suppressed.
  2. Missing plugins: Headless environments historically reported an empty plugin list, where a normal desktop browser reports several.
  3. Rendering differences: Font rasterization and canvas output can differ in headless mode, particularly in containers without a display server.
  4. Permission inconsistencies: Querying notification permissions can return states that do not occur in normal browsers.
  5. Window dimensions: Outer and inner window sizes may be identical, since there is no browser chrome occupying space.
  6. Absent interaction: No mouse movement, no scroll events, and no focus changes before an action is taken.
  7. Timing patterns: Page load to first interaction measured in milliseconds, far faster than a person reading a page.

Detection Probes:

const checks = {
  // Direct automation indicator
  webdriver: navigator.webdriver === true,

  // Historically empty under headless
  noPlugins: navigator.plugins.length === 0,

  // Chrome object absent in some automation setups
  noChrome: typeof window.chrome === "undefined",

  // No browser chrome means no height difference
  noWindowChrome: window.outerHeight === window.innerHeight,

  // Headless user agent string, now rarely left unmodified
  uaHeadless: /HeadlessChrome/.test(navigator.userAgent),

  // Language list empty or implausibly short
  noLanguages: navigator.languages.length === 0
};

Every one of these is trivially patchable, and stealth plugins patch all of them. Their value to a detection system is not that they catch sophisticated automation, but that they filter out the large volume of unmodified automation cheaply, before anything more expensive runs.

Why Older Guidance Is Outdated:

Much published advice on this topic describes a landscape that no longer exists.

Chrome’s headless mode was reimplemented in 2023. The old mode was a separate, lighter browser that differed from real Chrome in many observable ways. The current implementation runs the same browser binary with the window suppressed, which eliminates most of the differences the classic detection probes relied on.

Signal Old headless Chrome Current headless Chrome
User agent Contained HeadlessChrome Matches standard Chrome
Plugin list Empty Populated
window.chrome Often absent Present
Rendering Noticeably different Matches headful
navigator.webdriver True True, still the strongest signal

Where Detection Has Moved:

Because environmental probes have weakened, detection has shifted toward behavior and infrastructure, which are harder to patch.

Interaction patterns. A person moves a cursor along irregular paths, scrolls unevenly, and pauses. Automation jumps directly to coordinates and acts immediately. This is the domain of behavioral analysis.

Session shape. Real sessions wander, revisit pages, and abandon tasks. Automated sessions traverse efficiently and never backtrack.

Fingerprint coherence. A patched environment often contains internal contradictions, such as a plugin list that does not match the reported platform. Browser fingerprinting surfaces these.

Infrastructure signals. Datacenter IP ranges, unusual network characteristics, and TLS fingerprints that do not match the claimed browser.

The practical consequence is that patching detection probes is no longer sufficient on its own. A headless browser that passes every JavaScript check while arriving from a datacenter IP and navigating faster than any human could read is still clearly automated.

Bright Data’s Browser API runs full browser instances with managed fingerprints and residential network paths, which addresses the environmental, behavioral, and infrastructure layers together rather than individually.

FAIT CONFIANCE PAR 50,000+ CLIENTS DANS LE MONDE ENTIER

Ready to get started?