John
John

Reputation: 1003

Chrome Inspect Pixel Ratio doesn't change anything?

In chrome inspect it gives you the option to set/change the resolution and the pixel ratio. I have set a profile for pixel ratio of 1, and set a profile for ratio of 2 and 3 etc. But when i toggle between each profile...nothing changes..

Any idea why?

Even when i changed the setting to Responsive, and toggle between their settings for 1,2,3...nothing happens at all.

Thanks

Upvotes: 6

Views: 3230

Answers (1)

Matt Zeunert
Matt Zeunert

Reputation: 16571

I suspect that the device pixel ratio emulation feature is independent from the resolution. So you will only see a change if the page you're looking at uses the device pixel ratio, either by using min-devicepixel-ratio in CSS or by accessing window.devicePixelRatio.

For example, if you view this demo with iPhone 6 Plus emulation enabled you'll see this:

Evaluating window.devicePixelRatio in the console will return 3.

Most of the time the device pixel ratio is used to determine whether it's worth downloading a large version of an image at twice the normal resolution.

That means that even when a site does respond to the pixel ratio you won't necessarily see the difference very clearly. But if you check the network panel you'll see that instead of downloading image.png [email protected] was downloaded.

Upvotes: 3

Related Questions