What media queries expose
matchMedia() answers yes/no to environment questions that come from the OS and device:
prefers-color-scheme- light or dark, set by the OS theme.prefers-reduced-motionandprefers-reduced-transparency- accessibility settings.prefers-contrastandforced-colors- high-contrast / Windows high-contrast mode.pointerandany-pointer-fine(mouse/stylus) vscoarse(finger).hoverandany-hover- whether the primary input can hover.- display metrics - resolution, aspect ratio, orientation.
Each is one bit or a small enum, so the entropy per feature is low. The value is in the combination and its coherence with the rest of the device story.
The coherence and uniformity tells
Two ways this catches scrapers. First, device coherence: a request with an Android or iPhone User-Agent must report pointer: coarse and hover: none, because phones have no fine pointer and cannot hover. A "phone" that reports pointer: fine and hover: hover is a desktop headless browser wearing a mobile UA. Likewise a touch-capable tablet and a mouse-driven desktop have different pointer/hover signatures that must match the claimed device and the touch/hardware signals.
Second, fleet uniformity: headless browsers default to light color scheme, no reduced motion, fine pointer, and hover enabled. Real human traffic is a mix - a meaningful fraction use dark mode, some enable reduced motion, mobile users report coarse pointers. A population of visitors that all report the identical headless-default media profile stands out against the natural spread. Anti-bot systems use the distribution, not just the individual values.
