Offline web app is not working on iphone

826 views Asked by At

I have created an offline web app using local storage and manifest file. Its working fine online and offline when user open it in browser. but when user open it from add to home screen icon from iphone. it is showing error in offline mode.

here is cache manifest code example

CACHE MANIFEST
# Cache manifest version 0.1
# If you change the version number in this comment,
# the cache manifest is no longer byte-for-byte
# identical.

/scripts/home.js
/scripts/read.js


NETWORK:
*

But it is showing following errors when user open it from add to home screen icon in airplane mode

enter image description here

2

There are 2 answers

5
Samuli Hakoniemi On

I've fought with same issue some time ago. I got it working with this kind of combination:

CACHE MANIFEST
# Cache manifest version 0.1

CACHE:
/scripts/home.js
/scripts/read.js

FALLBACK:
. .

NETWORK:
*
0
Terren On

As of iOS 11.3, you can use service workers to accomplish this. Learn more at https://serviceworke.rs