質問

I am working on a web application that can be used online as well as offline. The user has the choice to download the content or not. That for a prompt opens and redirects him to a page that contains the manifest attribute on the HTML tag.

This works like a charm, the browser behaves as expected and downloads everything listed in the manifest and works in offline mode.

Now if the user adds the page to his homescreen, before he choses to download the content. He obviously gonna link to the page that has no manifest attribute.

If he choses to downloads the content from the webapp on his homescreen, the App will refuse to work in offline mode.

I suppose it is because the manifest tag is missing on file IOS originally cached/linked to on the homescreen.


Short overview:

Go Online -> Safari -> Chose to download appcache -> Add to homescreen -> Go Offline -> Open Webapp from Homescreen -> Works

Go Online -> Safari -> Add to homescreen -> Open Webapp from Homescreen -> Choose to download appcache -> Go Offline -> Open Webapp from Homescreen -> Does not work


How would you handle this? Is there any way to choose what file is linked on the homescreen? Coud I always serve a empty manifest file and populate it only for the version on the Homescreen? Do I miss something obvious?

役に立ちましたか?

解決

Try to add the start page without manifest attribute to the pages listed in the cache manifest. Once the browser will have downloaded the manifest it shouldn't have to rely on the attribute anymore.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top