I have been looking around the web to find what browser support there is for window.devicePixelRatio
, without much luck.
Does anyone know what browers/devices support this?
According to this blog post : ( from 2012 )
window.devicePixelRatio
is mostly trustworthy on most browsers.devicePixelRatio
by screen.width
to get the physical pixel count.screen.width
by devicePixelRatio
to get the dips count.2017 UPDATE:
This property returns the ratio of the resolution in physical pixels to the resolution in CSS pixels for the current display device. This value could also be interpreted as the ratio of pixel sizes: the size of one CSS pixel to the size of one physical pixel.
Desktop browsers support:
Chrome Edge Firefox Internet Explorer Opera Safari 49 (Yes) 49 11 41 9.1
Mobile Browsers:
Android Edge Firefox IE Mobile Opera Safari Mobile 4.4 (Yes) ? ? all 9.3
Draft Spec
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With