Bug 97556
Summary: | Mobile Safari for iOS and Google Chrome for iOS ignore viewport settings on .mobi domains | ||
---|---|---|---|
Product: | WebKit | Reporter: | Philipp Metzler <pp> |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | UNCONFIRMED | ||
Severity: | Normal | CC: | jkjiang, psolanki, wchooper |
Priority: | P2 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://www.davidroessli.com/logs/2010/04/safari_ignores_viewport_mobi_domains/ |
Philipp Metzler
Mobile Safari for iOS and Google Chrome for iOS ignore viewport settings on .mobi domains. If you don't specify a viewport for content served from a .mobi domain the rendering engine assumes a certain viewport other than for content served from a .com domain. If you define your own viewport it will be ignored.
See this article: http://www.davidroessli.com/logs/2010/04/safari_ignores_viewport_mobi_domains/
e.g.: we deliver the exact same content from http://www.caruso.mobi and from http://www.carusocarsharing.com
On the .mobi domain you can't zoom out to see the entire page. On the .com domain you can! You can try it by yourself on your iPhone here:
Everything OK:
http://www.carusocarsharing.com/static/css/test.html
clientWidth: 980
clientHeight: 1091
window.innerWidth: 980
window.innerHeight: 1091
screen.width: 320
screen.height: 480
****************************************
Doesn't work as expected:
http://www.caruso.mobi/static/css/test.html
clientWidth: 320
clientHeight: 356
window.innerWidth: 320
window.innerHeight: 356
screen.width: 320
screen.height: 480
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Philipp Metzler
In the meantime we redirect from http://www.caruso.mobi/static/css/test.html to http://www.carusocarsharing.com/static/css/test.html Not even then does the viewport work as expected!
But if you directly go to http://www.carusocarsharing.com/static/css/test.html it works as expected (you can zoom in and out properly with the magnifying gesture on the iPhone / iPad)
Alexey Proskuryakov
See also: bug 108982.
Alexey Proskuryakov
*** Bug 112633 has been marked as a duplicate of this bug. ***
Pratik Solanki
<rdar://problem/12369131>