2

I made an offline webapp. Used application cache and all the resources are added in .appcache file.

I have also added meta tag suggested by apple.

<meta name="apple-mobile-web-app-capable" content="yes" />

When I add it to home screen, it is added & opening in full screen mode.

While all the resources are cached by browser and I am getting no cache update request on reload.

But I try to open webapp while I am offline first time, it is giving me alert "Could not be opened because it could not connect to the server".

By the all the resource of app is already cached by browser still getting this error first time.

But If I open webapp first time while I am online, it is caching all the resources & then second time app is working fine even in offline mode.

Thanks Guys.

Parth
  • 527
  • 1
  • 8
  • 17

2 Answers2

0

When you add to homescreen that is the first time only a reference is added, think of it like a bookmark no content gets downloaded. That only happens after you open it for the first time. Seeing the web app in safari & adding to homescreen does not count since apple seems to maintain the data separately for apps added to homescreen via safari.

Ram G Athreya
  • 4,892
  • 6
  • 25
  • 57
  • I have the same problem even if I open the homescreen app once before going offline. Any suggestion? – Maxbester Apr 16 '14 at 15:12
  • Maxbester - I think your manifest is incorrect, use chrome debug tools to verify everything on a desktop pc if you can – Old fart Nov 11 '15 at 23:58
0

The Browser is a different app to the one which runs home screen web app.

I got caught the same way with my offline web app, to debug you change the settings in safari but the actual cache is different, the executable running the home screen app is different, it has several safari functions missing - google uiwebview and wkwebview

I don't know what is currently used for the user agent string, but they used to be different for browser based and home screen based back in ios7

Old fart
  • 590
  • 1
  • 4
  • 12