AppCache on iOS 10

I have a web app that can be added to the Home Screen and uses AppCache to save resources for offline use. Recently a user filed a bug saying that they could not open the app when their device was not connected to the internet. I was finally able reproduce the issue with this series of steps:

  1. Navigate to the app in Safari
  2. Add app to Home Screen
  3. Disconnect from the network
  4. Open app from the Home Screen


At step 4, an alert is displayed saying that the server could not be found. The app is unable to load at this point. However, the app is able to load in Safari, so I know that the resources are in AppCache.


Is AppCache storage not shared between Safari and Home Screen web apps? It looks like opening the app from the Home Screen for the first time causes the device to try to load the app from the network as if the site had never been visited. Is this correct?

I have this problem also.


It seems to be related to <meta name="apple-mobile-web-app-capable" content="yes">


My full-screen app doesn't cache properly, but turning off "web-app-capable" and running it in the browser works as expected.

AppCache on iOS 10
 
 
Q