All demos

What your browser says

The user agent, the screen and a dozen media queries describe your device before you touch anything. Here is what this page can read — and where the official classification stops being true.

The module's verdict

Reading the user agent…

Classes it added to html—

Read once, at import. Resizing the window or rotating the device will not change the type or the operating system — only the orientation is live.

What the page reads right now

Live — resize the window, rotate the device, flip the theme. updates: 0

  • Pointer——
  • Hover——
  • Touch points——
  • Viewport——
  • Colour scheme——
  • Motion——
  • Contrast——
  • Network——
  • Cores and memory——

Two answers to the same question

  • OrientationUser agent —Right now —Match —
  • Touch-firstUser agent —Right now —Match —
  • Operating systemUser agent —Right now —Match —
  • Layout widthUser agent —Right now —Match —

The columns answer different questions. The user agent describes the device it claims to be; the live signal describes what the page can do at this moment. They disagree on desktop-mode phones, touchscreen laptops and resized windows — which is why layout belongs to media queries, not to the device class.

The report, as JSON

Reading the browser…

Assembled in this tab from the same signals as the rows above. Nothing is sent anywhere — the network panel is the proof.

How it works

current-device classifies the user agent once, at import, and writes its verdict into classes on the html element. Everything else is read live: pointer and hover, touch points, viewport and pixel ratio, colour scheme, reduced motion, contrast, network type, cores and memory. The interesting part is the cross-check. The module answers "what device does the user agent claim to be"; the media queries answer "what can this page do right now". They disagree exactly where user-agent sniffing is known to fail — desktop-mode phones, touchscreen laptops and resized windows. Everything is assembled in this tab and never leaves it.

Built withJavaScript · Vue 3