Live data from Hacker News

What Is My Screen Resolution

whatismyscreenresolution.org

11–20 of 29 posts

Re: What Is My Screen Resolution

#11
I don't understand why it simultaneously gets it right and wrong...

> Your Screen Resolution is 1440 x 810

> Device Resolution: 1920 x 1080

Oooh, wait, I get it, it's because I have my default zoom set to ~130% for my shitty eyes.

Re: What Is My Screen Resolution

#12
Unfortunately, a lot of this is hot garbage.

① Its display dimension and screen diagonal figures are just a figment, due to a fundamental error in understanding of CSS units. It works by measuring how many pixels a div that’s been given style `width:1em;height:1em` takes—trouble is, that has always given you and will always give you the answer 96, because CSS units don’t correspond to physical units. (Firefox tried doing that long ago with the mozmm unit, but it became apparent that there’s almost no legitimate use for it, and it can’t actually be known on most devices anyway, so browser makers gave up on the idea.) So in practice, it’s just assuming 96dpi times the device pixel ratio.

② If your device pixel ratio is anything but one (e.g. high-DPI, or if you zoom in or out and then reload the page), the display dimension and screen diagonal figures are even more wrong, because it divides screen dimensions (which are in CSS pixels) by DPI (which it has calculated in device pixels).

③ It makes an assumption about the device pixel ratio that simply isn’t valid: it may not actually correspond to the number of physical pixels. The example I’m most familiar with is how Firefox under Wayland doesn’t implement fractional scaling¹, but instead renders at the next integer up and downsamples. My laptop is 2560×1440 run at 1.5× scaling; it detects it as 3412×1920 at 2×. The browser simply doesn’t expose what you need to be certain about these sorts of things. And Chromium under XWayland is saying 1706×960 with device pixel ratio 1, because Chromium itself isn’t even aware of the proper size. (XWayland is running at 1× scaling and upsampling to 1.5×; I used to run the sway/wlroots/xwayland hidpi patches and run it at 3× and downsample to 1.5×, but stopped at some point because it was too much bother and there had been some change in the software.)

④ It assumes screen.colorDepth is telling the truth (which it may well not be; on my device it’s 32 when I believe it should be 24). (It also shows both colour depth and pixel depth, even though they’re the same thing, only both present for “compatibility reasons” per the spec.)

—⁂—

¹ There’s actually been an experimental implementation for almost three years https://bugzilla.mozilla.org/show_bug.cgi?id=1707209>, but when I tried it back then I decided regretfully (the text rendering was beautifully crisp!) that it was unusable for a couple of reasons. Gonna switch back to sway-git and try it out again now, and they should actually care about bug reports now since the fractional-scale-v1 Wayland protocol has happened, whereas last time it was deemed too early for bug reports.

Re: What Is My Screen Resolution

#13
post #10

Since it's somehow able to determine a physical size for my monitor, it would be nice if it could also display my PPI. I'd find this useful when looking at monitors and comparing their pixel densities.

It doesn’t. The developer thought it did, but it actually just assumes 96dpi times the device pixel ratio (which is approximately the system scaling factor times the page zoom level).

Re: What Is My Screen Resolution

#14
post #11

I don't understand why it simultaneously gets it right and wrong... > Your Screen Resolution is 1440 x 810 > Device Resolution: 1920 x 1080 Oooh, wait, I get it, it's because I have my default zoom set to ~130% for my shitty eyes.

More carrot related ads incoming.

Re: What Is My Screen Resolution

#16
post #6
post #3

Why do I need to consent to tracking cookies for this?

Because you're not blocking "Annoyances" using uBlock Origin. ;)

Well, makes one wonder - why a tool like this needs tracking at all :). If they want to measure usage, there are plenty of privacy-first alternatives.

Re: What Is My Screen Resolution

#17
post #16
post #6

Earlier quoted context omitted.

Because you're not blocking "Annoyances" using uBlock Origin. ;)

Well, makes one wonder - why a tool like this needs tracking at all :). If they want to measure usage, there are plenty of privacy-first alternatives.

I agree, it was mostly in jest and to spread awareness that these prompts can be blocked too (but they're not enabled by default because they occasionally break some functionality).
Post reply on HN