Offhand, I'd say the caching does seem a bit unpredictable. My guess is that
at some point the user has done enough stuff elsewhere on the iPhone that
the memory space for the web cache and/or Safari is freed up and the page
must be reloaded.

I mentioned the unpredictability of the Safari cache to an Apple developer
at the iPhone Tech Talk and he advised me to file a bug (which I did). You
could also consider filing a bug with Apple but to be honest I'm not
optimistic this would be high on Apple's priority list no matter how many
people log bugs against it.

Best,
Ishan

On 9/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Try this:
>
> Here's the equivalent of a hello world HTML file -
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
> www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <HTML xmlns="http://www.w3.org/1999/xhtml";>
>
> <HEAD>
>         <META http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1"/>
>         <META name="viewport" content="maximum-scale=0.6667; width=480;"/>
>         <TITLE>Alive!</TITLE>
> </HEAD>
>
> <BODY>
> Look - still here!
> </BODY>
>
> </HTML>
>
>
> Serve it to the iPhone from your web server. Shut down the iPhone.
> Shut down the web server. Start the iPhone and look at the browser.
>
> When I do this with my phone and my web server (which might be
> relevant given that it could serve different headers than yours), the
> page is still there. No reload occurred.
>
> Perhaps this is a bug in the browser - I don't know. But it seems more
> of a caching issue to me. Assuming "correct" HTTP headers and/or meta
> tags, one would hope that the data would come from the cache. My
> question is more: what would those "correct" settings be?
>
> I've also read in places that there is not much cache space available
> - or that caching works rather unpredictably. Could that be it?
> Anybody have experience and reliable info about that?
>
>
> On Sep 6, 11:47 am, Jake <[EMAIL PROTECTED]> wrote:
> > when you shut down safari, you quit... refreshing when you come back
> > is a feature, not a bug.
> >
> > Now, if you've installed an apache server (I have) on your iPhone...
> > refreshes will be that much quicker!
> >
> > On Sep 6, 2007, at 11:36 AM, [EMAIL PROTECTED] wrote:
> >
> >
> >
> > > It refreshes as a white page if the web server is not available.
> > > That's what I'd like to avoid. I don't want the browser attempting to
> > > refresh the page unless the user explicitly requests it.
> >
> > > You don't have to be on the iPhone straight for a day. The scenario:
> > > load a page, shut off the phone and shut down the web server. If you
> > > turn the iPhone back on and go to the browser, the page is still there
> > > - and obviously, no attempt was made to contact the web server. Now if
> > > you try to look at the page a day or so later with the web server
> > > still down, it may or may not still be there. The browser may try to
> > > refresh it automatically, resulting in the blank page.
> >
> > > This issue has been obliquely referenced (i.e., without resolution) in
> > > other posts. For example,
> > >http://groups.google.com/group/iphonewebdev/browse_thread/thread/
> > > 677f779772b53a3b/08b6e4f67485edcd?
> > > lnk=gst&q=reload&rnum=10&hl=en#08b6e4f67485edcd
> >
> > > On Sep 6, 11:24 am, Randy Walker <[EMAIL PROTECTED]> wrote:
> > >> So your'e saying your page refreshes after a day or so?  Who is going
> > >> to be on a page on an iphone straight for a day?  I'm interested in
> > >> why It refreshes as a white page instead of showing the content
> > >> again.
> >
> > >> -=Randy
> >
> > >> On Sep 6, 2007, at 11:12 AM, [EMAIL PROTECTED] wrote:
> >
> > >>> Typically a day or so - which is why I thought it might have been
> > >>> "expires" related. This doesn't happen with just my apps - but also
> > >>> with other sites. For instance, Facebook (iPhone version), comcast's
> > >>> email (iPhone version), the game "Avalanche", etc.
> >
> > >>> Nothing timing out in my code that I know of - no setTimeout()
> > >>> calls,
> > >>> if that's what you mean. No event handlers except for a body tag
> > >>> unload handler which is just a stub right now.
> >
> > >>> On Sep 6, 10:13 am, Randy Walker <[EMAIL PROTECTED]> wrote:
> > >>>> How long before the page refreshes?  I've never had that happen.
> > >>>> Are you
> > >>>> sure you don't have something timing out in your code?
> > >>>> -=Randy
> >
> > >>>> On 9/6/07 10:02 AM, "[EMAIL PROTECTED]" <hiroshi-
> > >>>> [EMAIL PROTECTED]>
> > >>>> wrote:
> >
> > >>>>> Anybody know if there's a way to force the browser to reload a
> > >>>>> page
> > >>>>> ONLY when requested to do so by the user? Right now, the browser
> > >>>>> automatically attempts to reload the page (blanking it) if the
> > >>>>> user
> > >>>>> has been away from it for awhile. I'd like to have the page remain
> > >>>>> intact even if no internet connection is available.
> >
> > >>>>> I've tried a few header and meta tag settings (pragma, cache-
> > >>>>> control,
> > >>>>> and expires, for example), with no luck.
> >
> > >>>>> Any ideas?
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to