I do not completely agree with the correct rule. In reality, this answer is true in many cases ... but theoretically, this is not so. Often, requests made to the web server contain a User-Agent field, which theoretically can be used to recognize information about the resolutions and properties of the device screen.
Web requests do not first go through the client. They go to the server, which then serves the page for the client, so the server first receives the request ... Ruby on Rails, for example, receives the request through the action controller to the resource and then serves the page for response.
See an example UA analyzer, for example: https://github.com/visionmedia/user-agent
An example user agent sent by my computer:
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like enter code here`Gecko) Chrome/17.0.963.83 Safari/535.11
I think it is extremely possible to well understand that my screen resolution (DPI, etc.) is provided by this information through the server. Of course, you'll need a device information table for reference.
For mobile devices, this is even easier. If the User-Agent is Mobile Safari for iPad:
Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10
You can know with confidence what the screen resolution on the server is. You can even find out the height and width of the browser with this information. I suspect this is true for many mobile devices, such as Android or Win Mo.
So, summing up, I agree that this is inappropriate to do, but I also disagree.
I believe that Facebook took over the basic devices for cataloging projects and screen resolution and made it open source because they had similar problems when creating a facebook mobile application, for example. they had to catalog all the inconsistencies between all mobile browsers so that they could adapt the client application to each individual case. Perhaps this project may have the necessary information for this ... theoretically.