skip to content

browser design · lesson 2 of 6 · sources checked 2026-11-20

headless modes and their history

This lesson shows the headless modes of Chrome and Firefox, how they changed, and the signals that each mode can leave on a page.

status of this lesson: from a public source

purpose

A browser with no window is not always the same browser as the one with a window. Chrome had two different implementations of headless mode, and the old one still ships as a separate build. Thus the mode that you select decides which values a page can read.

objectives

  1. Explain the difference between a headful browser, the current headless mode of Chrome, and the headless shell.
  2. List the value groups that can separate a headless run from a headful run.
  3. Select a headless mode or a headful run with a display for a task.
  4. Compare two runs with a teaching battery of environment values.

new terms

headless mode
A browser mode that renders pages with no visible window.
headful
A browser mode that draws a real window on a display server.
headless shell
A separate Chrome build that keeps the old headless implementation.
software renderer
A GPU emulation in software that gives a known WebGL renderer string.
configuration
The set of factors of an attempt: the client, the browser build, the address class, the session state, the pace, and the entry path.
display server
The process that gives a headful browser a screen, for example Xvfb in a container.
Xvfb
A display server that keeps the screen in memory and has no physical display.
verdict
The result that a check gives. The sentence names the check: the oracle, a detector test page, a detection product, or a platform.

how it works

A headful browser draws a real window. A browser in headless mode can render the page with no visible window. The method of this course has two steps:

  1. Select a headless mode, or a headful run with a display.
  2. List the signals that the choice can leave on a page.

two implementations in chrome

Google documents the change of the headless mode of Chrome Google, source 1:

  • The old headless mode was a separate browser implementation. It was in the same binary, but it did not share the Chrome browser code.
  • From Chrome 112, Chrome makes its platform windows in headless mode, but it does not show them.
  • Thus the current headless mode and the headful mode of Chrome are one browser.

For example, a start of Chrome with the flag --headless gives the current headless mode.

the headless shell

The old implementation did not go away. Google states that the old headless code is available as a separate binary, chrome-headless-shell. Chrome for Testing gives this binary from Chrome 120 Google, source 2. This build is the headless shell.

In 2024, Google stated the plan to remove the old headless mode from Chrome in Chrome 132. It told the users of the old mode to use chrome-headless-shell Google, source 3.

An automation library can select the build for you.

claim of a company Microsoft states that Playwright ships a regular Chromium build for headed runs and a separate Chromium headless shell for headless runs. Playwright uses the shell by default in headless mode. The chromium channel selects the new headless mode Microsoft, source 4.

Thus "headless Chromium" can name two different builds. Record the build with each result.

firefox

In 2017, Mozilla stated that the headless mode of Firefox was available on all platforms from version 56. A start with the argument -headless selected it Mozilla, source 5.

the values that a page can read

A headless run has no screen of its own. Thus some values that a page reads come from the mode, not from a real display. I use three groups of values:

groupwhat a page readswhat can differ
GPU pathThe WebGL renderer stringA host with no GPU can give the string of a software renderer.
Permission pairNotification.permission and the notification state from navigator.permissions.query()The two reads of one permission can disagree.
Screen geometryThe screen size, the available size, and the outer and inner window sizesThe available size can be equal to the screen size, with no space for a task bar.

For example, a page reads denied from Notification.permission and prompt from the query. A difference between two reads of the same permission is a signal.

The request headers can also show the mode. In 2026, the authors of one study measured 10,000 websites with four browser configurations, one of them headless Chromium. Header-level signals alone caused 75% of the blocks that only headless Chromium got arXiv, source 6.

a headful run must have a display

A headful browser in a container or on a server must have a display server. For example, Xvfb keeps the screen in memory. Without a display server, a headful launch does not start a browser. Thus the run gives no data at all, and that is worse than a headless run.

A headful run with a display server removes the difference of the mode. But the display server sets the screen size, and the host sets the GPU path. These values are still signals of the host.

the two sides

automation sidedetection side
The current headless mode of Chrome is the same browser as the headful mode. The headless shell is a different implementation. A headful run with no display server gives no data.The GPU path, the permission pair, and the screen geometry can separate a headless run from a desktop browser. The headers can also show the mode before a page script runs.

design decisions

optiongaincostwhen it is correct
The headless shellIt is a lighter build, and it can start faster and use less memory.It is a different implementation from Chrome. Its values can differ from those of a headful Chrome.Tests of your own pages that do not examine the client
The current headless modeIt is the same browser code as headful Chrome.The host still sets the GPU path and the screen values.Tasks that must have Chrome behavior with no window
A headful run with a display serverThe page sees a real window and a screen.The run must have a display server and more memory. A missing display server gives no data.Tests that compare a headful run with a headless run
A record of the build and the mode with each resultYou can find which mode gave a value.Each result must store the build, the mode, and the launch options.Each run of a measurement

diagram

public changes of the headless modes of chrome, in version order

The old headless code of Chrome did not go away: it moved to a separate build.

code example

The example is a teaching battery, not a detector. It reads environment values and prints them as JSON. The battery gives no verdict.

example The two runs and all their values are synthetic. No value comes from a real host.

m10-x01-battery.tstypescript

Read the GPU string, the permission pair, the screen values, the cores, and the time zone of each run, and print them as JSON. A teaching battery, not a detector.

import { readFileSync } from "node:fs";

// A teaching battery, not a detector. It reads attributes and prints them as JSON.
// It gives no verdict. In a page, the same values come from the browser objects:
// WebGL, Notification.permission, navigator.permissions, screen, window, navigator, Intl.
type Env = {
  webglRenderer: string | null;
  notificationPermission: string; // Notification.permission
  permissionQueryState: string; // navigator.permissions.query({ name: "notifications" })
  screen: { width: number; height: number; availWidth: number; availHeight: number };
  outer: { width: number; height: number };
  inner: { width: number; height: number };
  hardwareConcurrency: number;
  timeZone: string;
};

// The battery compares the two permission reads with this map.
const PAIR: Record<string, string> = { default: "prompt", granted: "granted", denied: "denied" };

function battery(env: Env) {
  return {
    gpu: env.webglRenderer ?? "no WebGL",
    permissionPair: {
      notification: env.notificationPermission,
      query: env.permissionQueryState,
      agree: PAIR[env.notificationPermission] === env.permissionQueryState,
    },
    screen: {
      size: `${env.screen.width}x${env.screen.height}`,
      avail: `${env.screen.availWidth}x${env.screen.availHeight}`,
      outer: `${env.outer.width}x${env.outer.height}`,
      inner: `${env.inner.width}x${env.inner.height}`,
      availEqualsScreen:
        env.screen.availWidth === env.screen.width && env.screen.availHeight === env.screen.height,
    },
    cores: env.hardwareConcurrency,
    timeZone: env.timeZone,
  };
}

// The argument is a JSON file: { "run name": Env }. All values are synthetic.
const runs: Record<string, Env> = JSON.parse(readFileSync(process.argv[2], "utf8"));
for (const [name, env] of Object.entries(runs)) {
  console.log(JSON.stringify({ run: name, ...battery(env) }));
}

output

One JSON line for each synthetic run, with the permission pair and a comparison of the screen and the available size.

{"run":"run-a","gpu":"synthetic hardware renderer","permissionPair":{"notification":"default","query":"prompt","agree":true},"screen":{"size":"1920x1080","avail":"1920x1040","outer":"1280x900","inner":"1280x800","availEqualsScreen":false},"cores":8,"timeZone":"Asia/Tokyo"}
{"run":"run-b","gpu":"synthetic software renderer","permissionPair":{"notification":"denied","query":"prompt","agree":false},"screen":{"size":"800x600","avail":"800x600","outer":"800x600","inner":"800x600","availEqualsScreen":true},"cores":2,"timeZone":"UTC"}

I ran the code with the Node runtime and the flag --experimental-strip-types, on a file of two synthetic runs:

  • Run A has a hardware renderer string, a permission pair that agrees, and a task bar space in the available size.
  • Run B has a software renderer string, a permission pair that disagrees, and a screen that is equal to the window.

The battery prints the values and leaves the decision to you. Each value of run B is a signal that a page can read.

failure modes

problemcausecorrection
A headful run in a container gives no rows.The container has no display server, so the browser does not start.Start the display server before the browser. Check that the browser starts before you count a result.
Two runs of "headless Chromium" give different values.One run used the headless shell, and the other used the current headless mode.Record the build and the mode with each result.
A comparison of headless and headful shows a difference that the mode did not cause.The two runs used different hosts or different launch options.Compare the two modes on the same host, with the same options.
A run in headless mode shows a software renderer string.The host has no GPU path for the browser.Record the GPU path of the host with each result. The mode alone does not set it.

check questions

  1. Explain the difference between the current headless mode of Chrome and the headless shell.

    sample answer

    The current headless mode is the same browser code as headful Chrome. It makes its windows but does not show them. The headless shell is the old headless implementation. It is a separate binary that does not share the Chrome browser code.

  2. List the three groups of values that can separate a headless run from a headful run, with one value of each group.

    sample answer

    The GPU path, for example the WebGL renderer string. The permission pair, for example the notification permission value against the state of the permission query. The screen geometry, for example the available size against the screen size.

  3. You must compare a headful run with a headless run in a container. What must the container have for the headful run?

    1. A display server
    2. The headless shell
    3. A second time zone
    answer

    a. A display server

    A headful browser must have a display server. Without it, the browser does not start, and the run gives no data.

  4. Two results of "headless Chromium" from one automation library give different values. What is a possible cause?

    1. The two runs used the same build and the same mode
    2. One run used the headless shell, and the other used the current headless mode
    3. Headless mode has no screen values
    answer

    b. One run used the headless shell, and the other used the current headless mode

    An automation library can use the headless shell by default and the current headless mode through a channel. These are two different builds.

  5. The battery prints agree false for the permission pair of a run. What does this value show?

    1. The run is automation
    2. The page has no WebGL
    3. The two reads of one permission do not agree
    answer

    c. The two reads of one permission do not agree

    The battery gives no verdict. The value shows only that the two reads disagree, and a page can read this difference as a signal.

exercise

exercise Do this task in your own lab, with synthetic data only. Do not send a request to a site.

The input of runs A and B is synthetic. Each row is one run:

run keygpu string (webglRenderer)permission pairscreen and available sizeouter and inner sizecorestime zone
run-asynthetic hardware rendererdefault and prompt1920 x 1080, available 1920 x 10401280 x 900, inner 1280 x 8008Asia/Tokyo
run-bsynthetic software rendererdenied and prompt800 x 600, available 800 x 600800 x 600, inner 800 x 6002UTC
  1. Save the code example in an empty folder of your lab.
  2. Write a JSON file with run A and run B. Use the values of the table above.
  3. Add a run C to the JSON file.
  4. Give run C a hardware renderer string and the permission pair default and prompt.
  5. Give run C the screen, outer, and inner values of run B.
  6. Run the code with Node and the flag --experimental-strip-types.
  7. Record which values of run C agree with run A and which values agree with run B.
  8. Write which value group can still separate run C from a desktop browser.
sample answer

This sample answer uses the three synthetic runs only.

Run C has the GPU string and the permission pair of run A, so agree is true. Its screen is equal to its window, and availEqualsScreen is true, as in run B. Thus the screen geometry can still separate run C from a desktop browser with a task bar. A headful run with a display server sets the screen from that display server, so the host still sets this value.

sources

  1. Chrome Headless mode, Google, documentation, read 2026-11-20
  2. chrome-headless-shell, Google, article, read 2026-11-20
  3. Removing headless=old from Chrome, Google, article, read 2026-11-20
  4. Browsers, Microsoft, documentation, read 2026-11-20
  5. Using Headless Mode in Firefox, Mozilla, article, read 2026-11-20
  6. Detecting Bot Detection: Prevalence, Techniques, and Implications for Web Measurement Research, arXiv, paper, read 2026-11-20
  7. My model of the value groups that can separate a headless run from a headful run, 2026-11 (not public).