Have you verified that the cache manifest is being read & all the referenced 
files have been successfully saved when it was last online?

We've found that the various vendors implement offline web apps (cache manifest 
handling) different from each-other when it gets to the details, making it a 
very difficult thing to handle. I strongly recommend getting it functioning 
properly & tested on Safari Desktop before attempting to test on the phone, 
since the desktop is so much easier to debug and develop with.

I also suggest capturing and reporting the various cache manifest events that 
are thrown so you can watch the browser download the files in the manifest and 
verify that it gave a success message at the end.

Safari's Web Inspector is very helpful in this regard. Even if the initial 
download of the app based on the cache manifest is successful, safari will 
throw an error if the app requests a file not listed in the manifest or will 
try to access the file through the network *if the URL matches any prefix* in 
the NETWORK section of the manifest.

But from what you're describing, my best guess is that Safari doesn't like the 
manifest itself (is it served with the correct MIME type?) or that Safari had 
trouble downloading all the files referenced in the manifest.

-- peter

-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Ofir
Sent: Thursday, November 04, 2010 12:31 PM
To: iPhoneWebDev
Subject: Re: Offline web application - problem with Safari for iPhone

The iPhone is not connected to the net but when trying to browse to
the above url the Safari saying somthing like " can't find url"
instead of loading the url from local storage.

On 4 נובמבר, 00:07, Alon Raskin <[email protected]> wrote:
> I am confused. Why does it access the server if it is offline? How is it 
> accessing the server? Is it retrieving a MIME or is it a xmlHTTPRequest?
>
> Alon Raskin
> e: [email protected]
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On 
> Behalf Of The Mobile Spoon
> Sent: Wednesday, November 03, 2010 1:57 PM
> To: iPhoneWebDev
> Subject: Offline web application - problem with Safari for iPhone
>
> Hi,
>
> We have developed a web application using JS and Html5 which can run
> completely offline.
>
> We are using a local storage and in addition, the entire forms set is
> loaded in advanced, and only once.
> This means that when opening the URL while offline, the application
> loads the html and the data from the local database.
>
> On Android devices this is working great.
> On the iPhone, on the other hand, sometimes, when opening Safari - it
> tried to access the server, and if the 3G is and Wifi off - it raises
> an error.
>
> My question: how can we block this attempt by Safari - we would like
> to force it to stay offline and use the offline capabilities of our
> applicaiton.
>
> --
> 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 
> athttp://groups.google.com/group/iphonewebdev?hl=en.-הסתר טקסט מצוטט-
>
> -הראה טקסט מצוטט-

-- 
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.

-- 
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