+ 1
Get Screen Resolution of user's device
how to get actual screen resolution of mobile device. please notice that it should not return viewport of the browser but actual screen resolution of mobile device.
2 odpowiedzi
+ 3
Are you really sure to need the real screen resolution of the mobile device?
There's good reasons to handle virtual resolution on mobile device, and you can get the screen density ( number of real pixel per css pixel ) for responsive image serve...
To get few more information of how css pixels works quickly:
https://coderwall.com/p/ygcyha/how-to-get-real-mobile-css-resolutions-for-responsive-design
To dive in almost complete explanation on it:
http://www.quirksmode.org/blog/archives/2010/04/a_pixel_is_not.html
And at least, but not last, a discussion on stackoverflow about your question ( second link was found here, even if I already known Quirksmode site ):
http://stackoverflow.com/questions/20695196/screen-width-vs-device-real-resolution
- 1
http://fellowtuts.com/jquery/how-to-detect-the-screen-resolution-with-javascript/