Cache the resources and the data to make it work offline, and to stop it from reloading on iPhone

Problem:
The app reloads every time when I switch back to it from some other application on iPhone. That’s a common behaviour/problem with Safari on iPhone. The app also doesn’t work offline.

Cache the Resources:
You can try to add a simple cache manifest-file to the app, i.e. use the HTML5 Application Cache to make the app work offline. This should also stop it from reloading.
https://www.sitepoint.com/common-pitfalls-avoid-using-html5-application-cache/
https://www.html5rocks.com/en/tutorials/appcache/beginner/

PS. NirvanaHQ uses this technique.

Cache the Application Data:
To make the app work offline, you will probably also need to store the application data in the browser’s local storage.
-HTML Web Storage API
-https://developer.apple.com/library/content/documentation/iPhone/Conceptual/SafariJSDatabaseGuide/Name-ValueStorage/Name-ValueStorage.html

https://www.w3schools.com/html/html5_webstorage.asp
https://developer.apple.com/library/content/documentation/iPhone/Conceptual/SafariJSDatabaseGuide/Name-ValueStorage/Name-ValueStorage.html

@sergio - Will review these ideas. Thanks!