3 ms·
It makes mobile web browsers be honest about the size and resolution[1] of their screens; without it, they lie and claim to have desktop-sized viewports. Once
by gdwatson 7y ago
It makes mobile web browsers be honest about the size and resolution[1] of their screens; without it, they lie and claim to have desktop-sized viewports.
Once the browser is being honest about its screen, you can use CSS media queries and the like to do responsive web design, giving mobile devices content that fits them and is touch-friendly. If the browser is claiming a desktop-sized viewport, your options are to either serve a desktop layout or to do User-Agent sniffing and the like.
[1] All high-res devices today maintain a distinction between a CSS pixel (approximately 1/96 in.) and a device pixel, and they give their resolution in CSS pixels. This is dishonest from the point of view of 1995, but it’s convenient and it’s what web designers expect today.