Hacker News new | ask | show | jobs
by Rychard 557 days ago
All the browsers on my machine report my resolution as 1080p despite using 4k. I assume this is because I run at 200% scaling (I believe this is relatively common among anyone using a 4k resolution)

If the above-linked website uses data reported by the browser, I wonder how this scenario might be taken into consideration (or even if such a thing is possible)

1 comments

A pixel is defined as 1/96th of an inch in the web world so it is dependent on your dpi/scaling. There is a window.devicePixelRatio that JavaScript can use to get actual pixels.