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
posting from my iPhone... Problems with width of iPhone apps
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  16 messages - Collapse all  -  Translate all to Translated (View all originals)
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
 
David Cann  
View profile  
 More options Jun 29 2007, 9:09 pm
From: David Cann <davidjc...@gmail.com>
Date: Fri, 29 Jun 2007 18:09:49 -0700
Local: Fri, Jun 29 2007 9:09 pm
Subject: posting from my iPhone... Problems with width of iPhone apps
I've tried both 100% and 320px wide, but neither is working.  I think
safari is assuming an 800px width.  Anyone found a solution to this
yet?
-d

 
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.
Kevin Darling  
View profile  
 More options Jun 29 2007, 10:13 pm
From: Kevin Darling <kdarl...@basit.com>
Date: Fri, 29 Jun 2007 19:13:41 -0700
Local: Fri, Jun 29 2007 10:13 pm
Subject: Re: posting from my iPhone... Problems with width of iPhone apps
On Jun 29, 9:09 pm, David Cann <davidjc...@gmail.com> wrote:

> I've tried both 100% and 320px wide, but neither is working.  I think
> safari is assuming an 800px width.  Anyone found a solution to this
> yet?

I'm having a little trouble seeing your device ;-)

What does it do?  Spread it out or zoom it or ?


 
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.
Joe Hewitt  
View profile  
 More options Jun 30 2007, 12:48 am
From: Joe Hewitt <joehew...@gmail.com>
Date: Fri, 29 Jun 2007 21:48:11 -0700
Local: Sat, Jun 30 2007 12:48 am
Subject: Re: posting from my iPhone... Problems with width of iPhone apps
You need to insert this into your HTML head:

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

I found that in the source for onetrip, which is the only one of the
"ready for iPhone" apps that I've found which is formatted correctly
on the actual phone.


 
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.
David Cann  
View profile  
 More options Jun 30 2007, 12:55 am
From: David Cann <davidjc...@gmail.com>
Date: Fri, 29 Jun 2007 21:55:30 -0700
Local: Sat, Jun 30 2007 12:55 am
Subject: Re: posting from my iPhone... Problems with width of iPhone apps
Thanks, Joe, that's excellent!

On Jun 30, 12:48 am, Joe Hewitt <joehew...@gmail.com> wrote:


 
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.
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.
Julian David  
View profile  
 More options Jun 30 2007, 9:11 am
From: Julian David <mobid...@gmail.com>
Date: Sat, 30 Jun 2007 13:11:41 -0000
Local: Sat, Jun 30 2007 9:11 am
Subject: Re: posting from my iPhone... Problems with width of iPhone apps
Thanks, Christopher, for ideas above on setting viewport to keep
iPhone Safari browser from zooming out on every page, even when the
HTML/CSS would permit the content to be shown without zooming out.

I have tried to test this on the "emulator" iPhoney, but it doesn't
appear to work there.

What folks like me who don't yet have an iPhone in hand need to know
include:
(1) What apps on the Internet work on an actual iPhone without
constant zooming -- please provide website so one can look at their
HTML/CSS
(2) Does the Viewport suggestion above work? Can you point to an
Internet app that successfully uses it?

Thanks, everyone.


 
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.
David Cann  
View profile  
 More options Jun 30 2007, 9:15 am
From: David Cann <davidjc...@gmail.com>
Date: Sat, 30 Jun 2007 06:15:09 -0700
Local: Sat, Jun 30 2007 9:15 am
Subject: Re: posting from my iPhone... Problems with width of iPhone apps
Anybody else noticing that Safari keeps reloading pages when I return
to Safari after using other apps on the phone?  I suspect this is a
memory management issue, but it's very annoying and a bad user
experience on AJAX apps.  I ought to be able to keep several tabs open
in the background at all times and return to them right where I left
off.  When you refresh the page on most AJAX apps, you're returned to
the home page.

The slow JavaScript execution has really been bugging me, so I ran a
speed test here:

http://celtickane.com/projects/jsspeed.php

On my dual G5, I get about 430 milliseconds, but on my iPhone, I'm
consistently getting greater than 10,000 milliseconds!

It's clear now why their WWDC web app was so simple and really not web
2.0 or AJAX at all.  Considering these fairly serious flaws is giving
me hope that this is a temporary stop-gap measure on Apple's part
while they are (hopefully) working on a Cocoa-esque API for us.

-d

On Jun 30, 2:12 am, "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.
David Cann  
View profile  
 More options Jun 30 2007, 9:22 am
From: David Cann <davidjc...@gmail.com>
Date: Sat, 30 Jun 2007 06:22:32 -0700
Local: Sat, Jun 30 2007 9:22 am
Subject: Re: posting from my iPhone... Problems with width of iPhone apps
Yes, the viewport suggestion does work.  I got my iChat app mostly
working last night with the viewport meta tag:

http://davidcann.com/im/

Three issues that I'm still having:
* Lack of the onmousedown event is blocking my custom div flick
scroll... both horizontal and vertical.
* When the user clicks on a text box, it automatically zooms in, but
when exiting the text box, it doesn't automatically return to the
zoomed out state.  I'm testing if I can set the default size of the
text box to be so large that Safari realizes it doesn't need to zoom
in.
* The incredibly slow JavaScript execution is making my YUI animations
very choppy.

-d

On Jun 30, 9:11 am, Julian David <mobid...@gmail.com> wrote:


 
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.
Julian David  
View profile  
 More options Jun 30 2007, 10:35 am
From: Julian David <mobid...@gmail.com>
Date: Sat, 30 Jun 2007 14:35:36 -0000
Local: Sat, Jun 30 2007 10:35 am
Subject: Re: posting from my iPhone... Problems with width of iPhone apps
I have confirmed from an actual iPhone user that using <meta
name="viewport" content="width=320" /> in the HTML <head> prevents the
iPhone Safari browser from zooming out, as long as the body of the
page does not have content wider than 320.  The iPhone also appears to
scale well when rotated.

We tried the <meta name="viewport" content="initial-scale=1.0" />
declaration in an actual iPhone and it did what it is supposed to do
(scale up to the larger width), but we found it less preferable
because it scaled things too much.  For instance most lines of text
longer than 12 characters at 10pt size wrapped.

Our conclusion is to use Christopher's first suggestion: <meta
name="viewport" content="width=320" /> and then tweak/play if your
application has special needs.

Thanks all!


 
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.
Christopher Allen  
View profile  
 More options Jun 30 2007, 10:52 am
From: "Christopher Allen" <Christoph...@iPhoneWebDev.com>
Date: Sat, 30 Jun 2007 07:52:04 -0700
Local: Sat, Jun 30 2007 10:52 am
Subject: Re: posting from my iPhone... Problems with width of iPhone apps
On 6/30/07, Julian David <mobid...@gmail.com> wrote:

> I have confirmed from an actual iPhone user that using <meta
> name="viewport" content="width=320" /> in the HTML <head> prevents the
> iPhone Safari browser from zooming out, as long as the body of the
> page does not have content wider than 320.  The iPhone also appears to
> scale well when rotated.

I've found so far I'm unhappy with viewport of 320 in horizontal
orientation. I want the visual size of the fonts in horizontal to be
the same size as the fonts in vertical. I just want the text to be
reflowed wider.

> We tried the <meta name="viewport" content="initial-scale=1.0" />
> declaration in an actual iPhone and it did what it is supposed to do
> (scale up to the larger width), but we found it less preferable
> because it scaled things too much.  For instance most lines of text
> longer than 12 characters at 10pt size wrapped.

> Our conclusion is to use Christopher's first suggestion: <meta
> name="viewport" content="width=320" /> and then tweak/play if your
> application has special needs.

That is too bad -- I was hoping inital-scale would do what I want and
keep the font sizes the same in both orientations.

Have you tried any of the other viewport variants? user-scalable,
minimum-scale, maximum-scale? How about font size tweaks using:

<tag style="-webkit-text-size-adjust:none">
<tag style="-webkit-text-size-adjust:auto"> default
<tag style="-webkit-text-size-adjust:200%">

-- 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.
nroose  
View profile  
 More options Jun 30 2007, 10:54 am
From: nroose <nro...@earthlink.net>
Date: Sat, 30 Jun 2007 07:54:49 -0700
Local: Sat, Jun 30 2007 10:54 am
Subject: Re: posting from my iPhone... Problems with width of iPhone apps
Which viewport suggestion?

There seem to be several:

<meta name="viewport" content="width=320" />
<meta name="viewport" content="initial-scale=1.0" />
<meta name="viewport" content="user-scalable=false" />
<meta name="viewport" content="width=560" />

and even perhaps

<meta name="viewport" content="maximum-scale=2.0" />

Or something like that.

So, I don't have an iPhone, but I am trying to make my web app iPhone
friendly, and I think this should be done, I have made a page that
takes the querystring and puts it into meta viewport tags.

So, for instance

http://www.timeeclipse.com/viewport.asp?width=320

Will put

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

in there.  Feel free to test various combinations.  And please post
the results and any feedback.

On Jun 30, 6:22 am, David Cann <davidjc...@gmail.com> wrote:


 
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.
dvogel  
View profile  
 More options Jun 30 2007, 12:59 pm
From: dvogel <dlvo...@gmail.com>
Date: Sat, 30 Jun 2007 09:59:48 -0700
Local: Sat, Jun 30 2007 12:59 pm
Subject: Re: posting from my iPhone... Problems with width of iPhone apps
I just tried creating an inital page with just and iframe set to 320 x
320  for the content and using the viewport(width=320) and it works
like a champ.

On Jun 29, 6:09 pm, David Cann <davidjc...@gmail.com> wrote:


 
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.
Chris  
View profile  
 More options Jul 1 2007, 2:27 pm
From: Chris <chris.mess...@gmail.com>
Date: Sun, 01 Jul 2007 11:27:47 -0700
Local: Sun, Jul 1 2007 2:27 pm
Subject: Re: posting from my iPhone... Problems with width of iPhone apps
For some background on the 'viewport', I posted this to Brent Simmons'
iPhone group (http://lists.ranchero.com/listinfo.cgi/iphone-
ranchero.com):

The "viewport" is actually part of canvas, which is what WebKit
leverages to do all it's funky magic. Quite simply: "The viewport is
the part of the screen that you are currently seeing; everything you
see from the webpage is part of the viewport."

Whereas the canvas is everything else: "The canvas is the part of the
document the background-image is painted on. You can say it has an
infinite height and width so you can't position something on it."

This is from: http://annevankesteren.nl/2004/05/viewport-canvas-root

Here's the definition on the W3 site.. it's actually part of the
CSS2.1 spec:

http://www.w3.org/TR/CSS21/visuren.html#q2

There's more here from a WWDC tutorial:

> Default view port width is 390px. It's easy to get too narrow if you're not careful. Need to specify viewport property. <meta name="viewport" content="widget=320" />

> Six view port properties that can be set.

> width, height, initialscale, user - scalable ...

> We'll need to take advantage of -"WebKit":http://webkit.org/-text-size-adjustment to make things legible after double tap. -wgetkit-text-size-adjust:none|auto|percentage

http://www.atomictypewriter.org/read.php/WWDC07_Apple_Developer_Confe...

Anyway, that should give you some idea of what's going on. I find it
odd that they're using a metatag rather than a CSS property applied to
the body, but maybe that's something we should lobby the webkit folks
on... ;)

Chris

On Jun 30, 9:59 am, dvogel <dlvo...@gmail.com> wrote:


 
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.
Christopher Allen  
View profile  
 More options Jul 1 2007, 3:52 pm
From: "Christopher Allen" <Christoph...@iPhoneWebDev.com>
Date: Sun, 1 Jul 2007 12:52:00 -0700
Subject: Re: posting from my iPhone... Problems with width of iPhone apps
On 7/1/07, Chris <chris.mess...@gmail.com> wrote:

> > Default view port width is 390px. It's easy to get too narrow if you're not careful. Need to specify viewport property. <meta name="viewport" content="widget=320" />

The actual default for non-.mobi domains is 980, which is why iPhone
optimized web pages always appear so small on the screen. .mobi
domains default to 320.

-- 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.
Jeff Harrell  
View profile  
 More options Jul 1 2007, 3:53 pm
From: Jeff Harrell <jefferyharr...@gmail.com>
Date: Sun, 1 Jul 2007 15:53:50 -0400
Local: Sun, Jul 1 2007 3:53 pm
Subject: Re: posting from my iPhone... Problems with width of iPhone apps
I've added <meta name="viewport" content="width=320"> to my site, and  
it seems to keep the page from initially displaying at less than 1:1.  
Based on reports from friends, anyway.

On Jul 1, 2007, at 3:52 PM, Christopher Allen wrote:


 
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.
Christopher Allen  
View profile  
 More options Jul 1 2007, 4:20 pm
From: "Christopher Allen" <Christoph...@iPhoneWebDev.com>
Date: Sun, 1 Jul 2007 13:20:51 -0700
Local: Sun, Jul 1 2007 4:20 pm
Subject: Re: posting from my iPhone... Problems with width of iPhone apps
On 7/1/07, Jeff Harrell <jefferyharr...@gmail.com> wrote:

> I've added <meta name="viewport" content="width=320"> to my site, and
> it seems to keep the page from initially displaying at less than 1:1.
> Based on reports from friends, anyway.

If you are going to do width=320, I'd highly recommend you also set
user-scalable=0 (someone has reported that user-scalable=false may not
work, but I've not confirmed it yet).

The reason why is that you'll find that after certain actions, in
particular text input, that the scaling will go beyond 100%, making
your page to require scrolling to use, or pinching to return back to
the 320 wide.

I don't think this is the ultimate solution, as there are still issues
with horizontal orientation that are being worked out, but using the
above seems to solve 90% of them.

-- 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.
End of messages
« Back to Discussions « Newer topic     Older topic »