This question is similar, but the answer did not help.
The goal is to cache a single web page to the home screen, and launch this web page successfully even in offline mode.
Launching the web page from the home screen succeeds when there's a network, but it fails in offline mode because Safari complains there's no connection the server.
The web page contains this meta
tag:
<meta name="apple-mobile-web-app-capable" content="yes" />
Is this possible with web apps on iOS?
We fixed this by supporting a cached version of the app with the manifest
attribute as follows:
<!DOCTYPE HTML>
<html manifest="/cache.manifest">
....
</html>
The cache.manifest
file:
CACHE MANIFEST
# Version 0.0.2
NETWORK: *
CACHE:
ShareIconTutorial.png
HomeScreenIcon.png
FALLBACK:
Documentation is outdated on this topic because of PWAs, so hope this helps someone in the future!
Here is a description of using offline cache on iOS:
https://developer.apple.com/library/content/documentation/iPhone/Conceptual/SafariJSDatabaseGuide/OfflineApplicationCache/OfflineApplicationCache.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With