I have a problem detecting the retina of an iPad (and similar devices) using only screen.availWidth and window.devicePixelRatio . The problem is that iPhones and iPads give the number of dips for screen.availWidth , while Android devices seem to report the number of physical pixels, so I cannot reliably make screen.availWidth / window.devicePixelRatio to calculate if the screen has tablet size.
Is there any other DOM property that I can help you with?
edit - To summarize in a form that we hope makes clear that the question is not a duplicate
How can I find out if screen.availWidth reports a value that has already been configured to account for window.devicePixelRatio
source share