I'm new to javascript development. I'm trying to make an app that will work offline on both iOS and android devices. I'm have trouble learning with no examples and I'm not finding examples that do what I need.
Here's what I've found; it could be wrong:
iOS requires appcache.manifest and it needs to be loaded with this syntax:
<html manifest = "appcache.manifest">
Android requires manifest.json and it needs to be loaded with this syntax:
<html manifest = "manifest.json">
These seem mutually exclusive
Android also likes serviceworkers. You can have both appcache.manifest and serviceworkers; see this: Application Cache and Service Workers
The above discussion suggests handing appcache vs serviceworker with javascript. I get how it handles appcache & serviceworker but it doesn't address including manifest.json. It looks like the recommended place for scripts on an html page is someplace after the tag, at which point the decision between appcache.manifest (for ios) and manifest.json (for android) looks like it already needs to have been made.
How do you handle all this? Here are some questions that might get at the root of my confusion:
Do I need a manifest.json for Android? Or is this replaced by the serviceworker and that's why I have found zero examples involving both kinds of manifest?
Is there something I'm missing about order of operations that will allow me to choose between appcache.manifest and manifest.json programmatically?
Is there a more effective approach that I'm missing?