iosmeta-tagsviewportipad-3metatag

why doesn't the viewport meta constant device-width return 1536 pixels for the ipad 3 instead of 768 pixels?


I don't understand how else you can let each device figure out how a page is displayed on the screen, across all devices, if it just returns the same width as the older ipads that have a smaller pixel density. how is the ipad 3 supposed to know how to display the page with just the viewport meta tag?


Solution

  • window.devicePixelRatio should be set to 2 on retina devices; in Apple terms the width supplied is the width of the screen in points rather than pixels and then the pixel ratio tells you how many pixels there are per point.