0

I'm trying to build a html5 web app to be used in offline mode on iOS devices. I've created the cache.manifest file and put my html, css & img files.

I have two main issues with my offline web app:

1) Offline Mode Problem. Procedure:

a) open the webpage in Mobile Safari
b) bookmark it to the Home Screen.
c) I close the safari 
d) put the app on airplane mode.
e) open the app from home screen app icon

I get the error "Turn on cellular data or use Wi-Fi to access data", but if I open the same location from Safari it works fine.

The only way I can solve this is before I put the device on airplane mode, I have to open the app from homescreen and close it and put the device on airplane and when I open the app afterwards it works fine.

Is there anything wrong in my way of making the app or is this the way Apple has implemented the "add to home screen" feature, so whenever a user add a offline enabled webapp the user should at least open it once before its working as an offline version?

I thought this was the entire purpose of an offline app!

2) Multiple pages

I have created two sample pages(index.html & subpage.html) for the web app offline purpose. When I click the app icon from the home screen the web app is opening fine in the full screen mode, but when I click the link to the subpage.html from index.html it opens it on safari browser thereby goes out of the fullscreen app mode.

I have tested the above mentioned problems in the following devices and same errors/userexperience I get.

iPhone 4S - iOS v6.1
iPad Retina - iOS v6.1
4

1 回答 1

1

我不是专家,但据我所知,该页面必须在连接到互联网时至少加载一次。Html5离线效果很好,但是它只能在之前加载过之后才能离线加载页面。iPhone 在没有下载 .manifest 文件和 .html、.js、.css 等文件时无法打开应用程序。

于 2013-03-29T01:30:39.120 回答