The display geometry surface
A browser exposes two related coordinate systems. The screen: screen.width/height (full display), availWidth/availHeight (minus the taskbar/dock/menu bar), colorDepth (almost always 24), and devicePixelRatio (1 standard, 2 Retina, 1.25/1.5 on scaled Windows). And the window: innerWidth/innerHeight (viewport), outerWidth/outerHeight (including browser chrome), and screenX/screenY (position on screen). Common resolutions (1920x1080, 1440x900, 390x844) are shared by many users, so resolution alone is low-entropy, but the full tuple - resolution plus available area plus pixel ratio plus window size - is meaningfully identifying and, crucially, structured.
Coherence rules and headless defaults
The structure is what catches bots, because the values cannot be independent:
- 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; equal values (avail == full) suggests no OS chrome, common in headless. - Chrome height -
outerHeight - innerHeightis the browser toolbar height; zero means no chrome (headless) and a fixed unrealistic value across a fleet is a tell. - Pixel ratio coherence - an iPhone or Retina Mac UA with
devicePixelRatio: 1is contradictory; those devices are always >= 2.
Headless browsers default to telltale geometry - 800x600, 1280x720 with inner == outer, or 0x0 - and these defaults are shared across entire scraping fleets, making them stand out against the natural spread of real displays.
Setting believable display metrics
The fix is to present a complete, internally consistent display profile matching the claimed device: a common real resolution, available area reduced by a realistic OS chrome amount, a window size smaller than the screen with a non-zero toolbar height, and a device pixel ratio appropriate to the platform. For a desktop, 1920x1080 with availHeight around 1040, dpr 1, and a windowed viewport is safe; for a specific phone, use that model's exact metrics and pixel ratio.
As with the rest of the fingerprint, the display tuple must also agree with the User-Agent, Client Hints, hardware signals, and media queries (orientation, pointer type). It is one facet of a single coherent device identity - editing screen.width alone, while leaving the window sizes and pixel ratio at headless defaults, creates exactly the contradictions anti-bot systems look for.
