Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion posting from my iPhone... Problems with width of iPhone apps
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Christopher Allen  
View profile  
 More options Jun 30 2007, 2:12 am
From: "Christopher Allen" <Christoph...@iPhoneWebDev.com>
Date: Fri, 29 Jun 2007 23:12:44 -0700
Local: Sat, Jun 30 2007 2:12 am
Subject: Re: posting from my iPhone... Problems with width of iPhone apps
On 6/29/07, David Cann <davidjc...@gmail.com> wrote:

> safari is assuming an 800px width.  Anyone found a solution to this
> yet?

Since the iPhone does not have a "window", it has to decide what width
to use when it first renders the page in the zoomed-out mode. By
default it renders it in 980 pixels wide, which they said they found
the be the best number for most web sites. My assumption is that this
number was also picked as it is just a little over 3 times the width
of the iPhone. (Note there is an exception, if you connect to a .mobi
domain the iPhone defaults to a viewport of 320.)

Often 980 is not the appropriate size -- for instance, some narrow
pages (such as many single column word press blogs) will render with a
huge amount of white space to the left and right. In theses cases, you
can use a meta tag in the <head> to give the iPhone a hint as to what
viewport size to use, for example <meta name="viewport"
content="width=560" /> will render the initial window in a smaller
width window.

My belief is that for a web page to be considered iPhone "friendly"
(as per my post at
http://groups.google.com/group/iphonewebdev/browse_thread/thread/b199...
) that a web page must have a meta viewport tag.

If you give the hint <meta name="viewport" content="width=320" /> you
will get no scaling which is appropriate for iPhone webapps. However,
there is some question in my in my mind if this is the best technique,
as if you are using the iPhone in horizontal orientation, the initial
viewport will now be too narrow.

Instead, you may be able to use one of the other choices for viewport,
which in addition to height is
initial-scale (first loaded scale), user-scalable (boolean),
minimum-scale (default 0.25), maximum-scale (default 1.6).

I think some experimentation is required as to what is the best
approach. I suspect that something like <meta name="viewport"
content="initial-scale=1.0" /> may be the best choice for iPhone
webapps, as I think it will do the right thing at both orientations.

I'd test this myself tonight, but because of an AT&T activation SNAFU,
I'll not have my iPhone activated until tomorrow, so if someone else
can test some of these viewports, I'd appreciate it.

-- Christopher Allen


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.