Detecting a retina display iPad with javascript
问题 I'm having a problem detecting a retina iPad (and similar devices) using just screen.availWidth and window.devicePixelRatio . The problem is that iPhones and iPads give the number of dips for screen.availWidth whereas android devices seem to report the number of physical pixels so I can't reliably do screen.availWidth / window.devicePixelRatio to calculate if the screen is of a tablet size. Is there some other DOM property I can use to help me? edit - To sum up in a way which hopefully makes