devicePixelRatio matches matchMedia resolution
Check id dpr-matchmedia
What an ordinary browser yields
matchMedia resolution in dppx falls within ±0.01 of the reported devicePixelRatio (or the feature is unsupported, which reads N/A).
What a detector infers
The check compares window.devicePixelRatio against the layout engine's own answer, querying matchMedia with a min-resolution/max-resolution band in dppx around the reported value. It first feature-detects support for the resolution media feature and reports N/A where the feature is unavailable, and it uses a ±0.01 tolerance band so that legitimate fractional ratios (Windows display scaling, Android densities) are not failed by floating-point round-tripping. Like the screen check, this is a two-source read of one underlying quantity: devicePixelRatio is a JS property, while resolution in dppx is computed by the rendering pipeline. A detector observing a mismatch infers that the ratio was patched at the JS surface while rasterization continued at the true scale — an inconsistency a genuine browser cannot produce, since both trace back to the same device scale factor.
How to resolve it
Leave devicePixelRatio to the real rendering scale. To present a different ratio, set it at launch through the browser's device-scale-factor so the compositor rasterizes at that scale, rather than overriding the property from page script.
Read in the wild by
Kasada
Reads window.devicePixelRatio in both the page realm and a hidden iframe realm it creates itself, and separately binary-searches the CSS resolution media feature in dpi.
probes.txt: window_device_pixel_ratio, iframe_device_pixel_ratio, media_resolution. Page realm: 2.txt:7134 `r5.efg["devicePixelRatio"]`; iframe realm: 2.txt:11769 `r4.lbg["devicePixelRatio"]`, where lbg is bound to the iframe's contentWindow at 2.txt:39630 (`r6 = r5["contentWindow"]; r4["lbg"] = r6;`). The iframe is built at 2.txt:17558-17566: `document.createElement("iframe")`, `style.display = "none"`, `src = "javascript:;"`, `body.appendChild`. Resolution probe at 2.txt:29932 and 3.txt:38313 (two script versions): `r5.call(undefined, "resolution", 0, 512, 1, "dpi")`, via the bound window.matchMedia query builder at 2.txt:14573. Source: ips.js 427-probe teardown (emro.cat, Apr 2026).
CreepJS
CreepJS, an open research demo rather than a production detector, re-asks the layout engine for the reported ratio with an exact `(resolution: <dpr>dppx)` media query and records a mismatch as a lie against Window.devicePixelRatio, skipping the check on WebKit.
src/screen/index.ts:37-53 — `const dpr = window.devicePixelRatio || 0` … `const hasLiedDPR = !matchMedia(`(resolution: ${dpr}dppx)`).matches` … `if (!IS_WEBKIT && hasLiedDPR) { lied = true; documentLie('Window.devicePixelRatio', 'lied dpr') }` (github.com/abrahamjuliot/creepjs, master)
Every attribution traces to a published artifact. See the sources and their limits.
Nearby checks in Screen & display
- screen.width/height backed by the display (matchMedia)
screen-matchmediaThis check reads window.screen.width/height, then asks the CSS media-query engine the same question via matchMedia("(device-width: Npx) and… - screen dimensions are a plausible physical size
screen-plausibleA pure sanity range on screen.width and screen.height: both must be at least 200px and no more than 16384px. - the available screen area fits inside the screen
screen-avail-within-boundsThe available screen area is a subset of the screen by definition: availWidth and availHeight describe what is left of width and height… - screen.colorDepth decomposes into the CSS color media feature
color-depth-vs-media-colorscreen.colorDepth and the CSS color media feature describe one display in two different units: total bits per pixel, and bits per colour… - screen has an OS chrome inset (avail < screen on either axis)
taskbar-presentscreen.availWidth/availHeight describe the area left over after the OS reserves space for its own chrome — a Windows taskbar, a macOS dock… - the outer window fits within the screen
window-boundsThe check asserts only the zoom-invariant bound: window.outerWidth/outerHeight must be non-zero and must fit within the screen. - a non-touch desktop has a fine pointer + hover
pointer-hover-desktopThis check applies only when the UA identifies a desktop platform (Windows, Macintosh, Mac OS X, X11, Linux, CrOS, and not Android/Mobile)… - maxTouchPoints coheres with pointer media
touch-pointer-coherenceA one-directional coherence test: if navigator.maxTouchPoints is greater than zero, matchMedia("(any-pointer: coarse)") is expected to…
Clearcote is a browser built for fingerprint coherence
It is a Chromium fork, maintained by the same people who wrote this reference. It ships as a compiled browser rather than as a stealth script injected into someone else's — which is a description of how it is built, and is not an argument about how it behaves on this check.
This audit takes no position on how Clearcote scores on Screen & display checks, on this one, or anywhere else. It has no baseline corpus of other people's fingerprints to rank you against and no vendor scoreboard — nearly every check is self-referential, asking one browser the same question through two independent APIs and reporting whether both answers can be true at once. It runs identically on any browser, including ours. Run it on yours and read the result yourself.
See the other checks in Screen & display — the family dpr-matchmedia belongs to.