Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IPhone/Safari: Is there a way to stop resizing the page on load?

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?

like image 975
Programmin Tool Avatar asked Mar 30 '09 15:03

Programmin Tool


People also ask

How do I adjust the width of my browser on my Iphone?

You can also manually resize your browser—just click and drag the right-bottom of your Safari window, and Resize will display its current size in real-time.


1 Answers

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

like image 197
Mark W Avatar answered Oct 09 '22 12:10

Mark W