Don't devices/browsers report the display PPI somehow? If not, that's such a gap in the web standards.
No, thx to privacy
I mean there are already APIs for location, file access, camera/mic, and more...