Hacker News new | ask | show | jobs
by anonymoushn 5024 days ago
It looks like it detects the resolution of the primary display. I'm not sure if there's a way to pick the "right" display, though.

  Screen Width        1440
  Screen Height       900
  Browser Width       2560
  Browser Height      1368
3 comments

For Firefox on OS X, at least, it seems to be reporting the resolution of the display which the window is mostly on.

I think this corresponds to the display which holds the backing store for the window, but I'm not sure -- if you drag a window between a HiDPI display and a normal display, for example, it's rendered as a HiDPI window if it's mostly on the HiDPI display, and vice versa.

I agree that I don't know if it's possible to do the "right" thing, or even exactly what the "right" thing would be.

I'm not really sure if it's a glitch in the tool or that the resolution is (deliberately?) misreported by my browser, but on my iPad 3 it reports 1024x768.

A nice extension to this would be to add some kind of database of popular mobile devices, so you can detect the device type from the reported attributes. I think you coud extract some interesting device usage statistics out of it.

That's the size reported by Safari so that pages scale correctly for a "retina" screen.
Yeah my 1920X1200 Dell display reports at 1536X960