views:

1465

answers:

1

This is a long shot but I'm hoping there's a way to stop IPhones from resizing a page on load. Problem is if it's a site with a lot of need for refreshing (Say a forum) it gets a little old for users to have to resize that page every refresh.

Is there a way to force Safari/The IPhnone to not minimize the site on refresh that doesn't involve a user changing a setting?

+3  A: 

There is a meta tag you can use that will constrain the viewport for the iPhone:

<meta name="viewport" content="width=320" />

From Apple's developer documentation:

Use the viewport meta tag to improve the presentation of your web content on iPhone. Typically, you use the viewport meta tag to set the width and initial scale of the viewport. For example, if your webpage is narrower than 980 pixels, then you should set the width of the viewport to fit your web content. If you are designing an iPhone-specific web application, then set the width to the width of the device.

There is a constant you can use for the iPhone's device width: width=device-width.

Not sure if this link will work, but you can read more about Mobile Safari and the viewport tag on the Apple Developer website

Mark W
Exactly what I needed. You and I should be bffs.
Programmin Tool