Deleted Comment
It also gets multiplied by the browser’s zoom, which in both Firefox and Chrome include values like 80%, 90% and 110%.
So for me on HN at 120% on my 1.5× laptop display, devicePixelRatio is… 1.8181818181818181. Huh. Wonder why it’s not 1.8. ¯\_(ツ)_/¯
This is completely false. No browser that I know of does any such thing, nor would it make any sense to do so (nor would it achieve the goal you specify to any meaningful extent).
The closest thing that does happen is that browsers use integer fractions of pixels as their basic layout unit: Firefox and its kin sixtieths, Chrome and its kin sixty-fourths.
But the rest of your answer is correct; and to add a proper citation: “the reference pixel is the visual angle of one pixel on a device with a device pixel density of 96dpi and a distance from the reader of an arm’s length” <https://drafts.csswg.org/css-values-4/#reference-pixel>.
https://developer.mozilla.org/en-US/docs/Web/API/Window/devi...
Also, even if they didn't, there's no standard for what the correct DPI should be for a device; it theoretically should depend on viewing distance, but it's impractical to constantly change the screen DPI depending on how far away the user's eyes are :)
OP could, however, use a better default than 96 DPI for mobile devices. Most are targeting ~160-ish.
Only since Wednesday of this week due to COMCO action, so no-one knows if cashback will persist, but it will be a lot less than .33%.
> And let's not forget that cash acceptance costs an order of magnitude more than this anyway;
In the EU, it's .5% for cash vs .3% for cards, but the situation falls back into favour for cash once fraud is accounted for.
That Visa fee table is dated July 2023?