Skip to content

Screen Fingerprinting

Screen fingerprinting collects physical display properties and user preferences. While individual values are common, the combination of all screen signals creates a useful fingerprint component.

Collected signals

SignalSourceExample
widthscreen.width1920
heightscreen.height1080
colorDepthscreen.colorDepth24 or 30
pixelDepthscreen.pixelDepth24 or 30
devicePixelRatiowindow.devicePixelRatio2 (Retina)
orientationscreen.orientation.typelandscape-primary
HDRmatchMedia('(dynamic-range: high)')true
Color gamutmatchMedia('(color-gamut: p3)')p3, rec2020, srgb
Color schemematchMedia('(prefers-color-scheme: dark)')dark, light
Reduced motionmatchMedia('(prefers-reduced-motion: reduce)')true, false
ContrastmatchMedia('(prefers-contrast: high)')high, low, no-preference
Touch pointsnavigator.maxTouchPoints0 (desktop), 5 (mobile)

Entropy and stability

PropertyValue
Entropy~6 bits
Stability0.70
Typical duration<1ms

Screen properties change when the user connects an external monitor, changes resolution, or rotates a mobile device.

Cross-browser considerations

Several screen signals are excluded from crossBrowserId:

  • colorDepth/pixelDepth — Chrome reports 30, Safari reports 24 on the same display
  • width/height — Safari reports viewport size instead of physical resolution (changes with window resize and Stage Manager)

Only devicePixelRatio, hdr, colorGamut, and touchPoints are used in cross-browser hash.

Usage

ts
const fp = await neoprint.get({ collectors: ['screen'] })
const screen = fp.components.screen.value

console.log(screen.width, 'x', screen.height)
console.log('DPR:', screen.devicePixelRatio)
console.log('HDR:', screen.hdr)
console.log('Gamut:', screen.colorGamut)

Released under the MIT License.