devicePixelRatio
Limited availability
The window.devicePixelRatio
read-only property returns the ratio of the size of one CSS pixel to the vertical size of one physical pixel on the current display device.
Learning resources on MDN
Browser support (view on caniuse.com)
- Chrome 1 Released on 2008-12-11
- Chrome Android 18 Released on 2012-06-27
- Edge 12 Released on 2015-07-29
- Firefox 18 Released on 2013-01-08
- Firefox for Android 18 Released on 2013-01-08
- Safari ❌
- Safari on iOS ❌
Baseline availability blocked since July 2015 by Safari (115 months)
Specifications
View web-platform-tests results for this feature - View the feature source file - Edit the feature - Report an issue about this feature