The display geometry surface
A browser exposes two related sets of measurements. First the screen itself: screen.width/height (the full display), availWidth/availHeight (the display minus the taskbar, dock, or menu bar), colorDepth (bits of color per pixel, almost always 24), and devicePixelRatio (physical pixels per CSS pixel - 1 on a standard screen, 2 on Retina, 1.25 or 1.5 on scaled Windows). Then the window: innerWidth/innerHeight (the viewport, meaning the visible page area), outerWidth/outerHeight (including the browser's own toolbars, known as chrome), and screenX/screenY (where the window sits on the screen). Common resolutions (1920x1080, 1440x900, 390x844) are shared by many users, so resolution alone is low-entropy. But the full set together - resolution plus available area plus pixel ratio plus window size - is meaningfully identifying and, just as important, it is structured: the values have to make sense relative to each other.
Coherence rules and headless defaults
That structure is what catches bots, because the values cannot be set independently:
- Window within screen -
outerWidth/Heightcannot exceedscreen.availWidth/Height. A window bigger than the screen is impossible on real hardware. - Available area -
availHeightshould bescreen.heightminus a plausible taskbar/dock; if the two are equal (avail == full) it implies no OS bars at all, which is common in headless. - Chrome height -
outerHeight - innerHeightis the height of the browser's toolbars; zero means no chrome (headless), and the same fixed, unrealistic value across many machines is a tell. - Pixel ratio coherence - an iPhone or Retina Mac User-Agent paired with
devicePixelRatio: 1is a contradiction, because those devices are always >= 2.
Headless browsers ship with telltale default geometry - 800x600, 1280x720 with inner == outer, or 0x0 - and because those defaults are reused across an entire scraping fleet, they stand out against the natural spread of real displays.
Setting believable display metrics
The fix is to present one complete, internally consistent display profile that matches the device you claim to be: a common real resolution, an available area reduced by a realistic amount of OS chrome, a window smaller than the screen with a non-zero toolbar height, and a device pixel ratio that fits the platform. For a desktop, 1920x1080 with availHeight around 1040, dpr 1, and a windowed viewport is safe; for a specific phone, copy that model's exact metrics and pixel ratio.
As with the rest of the fingerprint, the display values must also agree with the User-Agent, Client Hints, hardware signals, and media queries (orientation, pointer type). The display is just one facet of a single coherent device identity - editing screen.width on its own, while leaving the window sizes and pixel ratio at their headless defaults, creates exactly the contradictions anti-bot systems look for.
