iOS 12 does not support offline feature of some PWAs
iOS 12 Safari does not support the offline feature of some PWAs (Progressive Web App). It seems like Safari does not cache resources in those web apps properly.
For example, the following PWAs cannot work offline in iOS 12 and 12.1, but they all work perfectly in Chrome on Android or Windows:
The Air Horner PWA that is used by google to demonstrate Service Worker:
Air Horner
And these two:
2048 puzzle
Voice Memos
Steps to reproduce (100% reproducible):
- visit the PWA with Safari (iOS 12 or 12.1)
- close the PWA tab in Safari
- push home button on iPhone to set Safari to background
- push the iPhone power button to turn off screen
- push the iPhone power button again to wake up the phone
- turn off all the network connection from the iPhone control center (both wifi and cellular)
- open Safari, visit PWA again --> the web app fail to load
This has been bothering me for a long time, as my own web app also has the similar issue - works fine in Chrome on Android / Windows but only fails on iOS 12 Safari. Any idea what special in iOS 12 Safari? Thank you very much!
ios safari service-worker progressive-web-apps
add a comment |
iOS 12 Safari does not support the offline feature of some PWAs (Progressive Web App). It seems like Safari does not cache resources in those web apps properly.
For example, the following PWAs cannot work offline in iOS 12 and 12.1, but they all work perfectly in Chrome on Android or Windows:
The Air Horner PWA that is used by google to demonstrate Service Worker:
Air Horner
And these two:
2048 puzzle
Voice Memos
Steps to reproduce (100% reproducible):
- visit the PWA with Safari (iOS 12 or 12.1)
- close the PWA tab in Safari
- push home button on iPhone to set Safari to background
- push the iPhone power button to turn off screen
- push the iPhone power button again to wake up the phone
- turn off all the network connection from the iPhone control center (both wifi and cellular)
- open Safari, visit PWA again --> the web app fail to load
This has been bothering me for a long time, as my own web app also has the similar issue - works fine in Chrome on Android / Windows but only fails on iOS 12 Safari. Any idea what special in iOS 12 Safari? Thank you very much!
ios safari service-worker progressive-web-apps
add a comment |
iOS 12 Safari does not support the offline feature of some PWAs (Progressive Web App). It seems like Safari does not cache resources in those web apps properly.
For example, the following PWAs cannot work offline in iOS 12 and 12.1, but they all work perfectly in Chrome on Android or Windows:
The Air Horner PWA that is used by google to demonstrate Service Worker:
Air Horner
And these two:
2048 puzzle
Voice Memos
Steps to reproduce (100% reproducible):
- visit the PWA with Safari (iOS 12 or 12.1)
- close the PWA tab in Safari
- push home button on iPhone to set Safari to background
- push the iPhone power button to turn off screen
- push the iPhone power button again to wake up the phone
- turn off all the network connection from the iPhone control center (both wifi and cellular)
- open Safari, visit PWA again --> the web app fail to load
This has been bothering me for a long time, as my own web app also has the similar issue - works fine in Chrome on Android / Windows but only fails on iOS 12 Safari. Any idea what special in iOS 12 Safari? Thank you very much!
ios safari service-worker progressive-web-apps
iOS 12 Safari does not support the offline feature of some PWAs (Progressive Web App). It seems like Safari does not cache resources in those web apps properly.
For example, the following PWAs cannot work offline in iOS 12 and 12.1, but they all work perfectly in Chrome on Android or Windows:
The Air Horner PWA that is used by google to demonstrate Service Worker:
Air Horner
And these two:
2048 puzzle
Voice Memos
Steps to reproduce (100% reproducible):
- visit the PWA with Safari (iOS 12 or 12.1)
- close the PWA tab in Safari
- push home button on iPhone to set Safari to background
- push the iPhone power button to turn off screen
- push the iPhone power button again to wake up the phone
- turn off all the network connection from the iPhone control center (both wifi and cellular)
- open Safari, visit PWA again --> the web app fail to load
This has been bothering me for a long time, as my own web app also has the similar issue - works fine in Chrome on Android / Windows but only fails on iOS 12 Safari. Any idea what special in iOS 12 Safari? Thank you very much!
ios safari service-worker progressive-web-apps
ios safari service-worker progressive-web-apps
asked Nov 23 '18 at 0:27
agrulagrul
14
14
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
I had the same issue, using service worker without Workbox resolved the problem - app starts without internet connection but something is messed up with caching - it's not working.
My app does not use Workbox either. Still not working. The thing is that few offline apps did work, for example, simpleoffline.website and currency-calc.com, weird.
– agrul
Nov 28 '18 at 10:31
Share just the crucial code on jsfiddle, I will look to it.
– tmdoit
Nov 28 '18 at 21:23
Just take the airhorner as example. Its Service Worker script is here (simple enough): airhorner.com/sw.js. If I follow the steps list in my question above, the app won't load offline. And it does not use Workbox.
– agrul
Nov 28 '18 at 23:59
I've repeated scenario and ended up with the same result. I've asked in comments about this issue bugs.webkit.org/show_bug.cgi?id=190269. Strange is that when you add it to the home screen, run it and then turn off internet connection you can still use it as standalone app - I think the webview treat webapp as a normal cached website. Thats why there are only assets/files downloaded from your visit, there are no assets/files which should be downloaded by service worker - you can test it offline.
– tmdoit
Nov 29 '18 at 18:05
here it is: bugs.webkit.org/show_bug.cgi?id=192166
– agrul
Nov 29 '18 at 19:11
add a comment |
I faced the exact same issues.
What I realized is, all the caches are set correctly when the service worker is activated, but if you close safari with the iOS task manager (not only reduce it), all cached files get completely deleted when going back on the PWA.
add a comment |
Indeed offline works in the Homescreen. However, the cache does not get updated on new versions & the Homescreen link stops working. To refresh the cache, one is obliged to access the web app from Safari, and then it works again. This is really sub-optimal & will hopefully be fixed.
add a comment |
The issue is resolved in iOS 12.1.2 on my iPhone 6S.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53439379%2fios-12-does-not-support-offline-feature-of-some-pwas%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
I had the same issue, using service worker without Workbox resolved the problem - app starts without internet connection but something is messed up with caching - it's not working.
My app does not use Workbox either. Still not working. The thing is that few offline apps did work, for example, simpleoffline.website and currency-calc.com, weird.
– agrul
Nov 28 '18 at 10:31
Share just the crucial code on jsfiddle, I will look to it.
– tmdoit
Nov 28 '18 at 21:23
Just take the airhorner as example. Its Service Worker script is here (simple enough): airhorner.com/sw.js. If I follow the steps list in my question above, the app won't load offline. And it does not use Workbox.
– agrul
Nov 28 '18 at 23:59
I've repeated scenario and ended up with the same result. I've asked in comments about this issue bugs.webkit.org/show_bug.cgi?id=190269. Strange is that when you add it to the home screen, run it and then turn off internet connection you can still use it as standalone app - I think the webview treat webapp as a normal cached website. Thats why there are only assets/files downloaded from your visit, there are no assets/files which should be downloaded by service worker - you can test it offline.
– tmdoit
Nov 29 '18 at 18:05
here it is: bugs.webkit.org/show_bug.cgi?id=192166
– agrul
Nov 29 '18 at 19:11
add a comment |
I had the same issue, using service worker without Workbox resolved the problem - app starts without internet connection but something is messed up with caching - it's not working.
My app does not use Workbox either. Still not working. The thing is that few offline apps did work, for example, simpleoffline.website and currency-calc.com, weird.
– agrul
Nov 28 '18 at 10:31
Share just the crucial code on jsfiddle, I will look to it.
– tmdoit
Nov 28 '18 at 21:23
Just take the airhorner as example. Its Service Worker script is here (simple enough): airhorner.com/sw.js. If I follow the steps list in my question above, the app won't load offline. And it does not use Workbox.
– agrul
Nov 28 '18 at 23:59
I've repeated scenario and ended up with the same result. I've asked in comments about this issue bugs.webkit.org/show_bug.cgi?id=190269. Strange is that when you add it to the home screen, run it and then turn off internet connection you can still use it as standalone app - I think the webview treat webapp as a normal cached website. Thats why there are only assets/files downloaded from your visit, there are no assets/files which should be downloaded by service worker - you can test it offline.
– tmdoit
Nov 29 '18 at 18:05
here it is: bugs.webkit.org/show_bug.cgi?id=192166
– agrul
Nov 29 '18 at 19:11
add a comment |
I had the same issue, using service worker without Workbox resolved the problem - app starts without internet connection but something is messed up with caching - it's not working.
I had the same issue, using service worker without Workbox resolved the problem - app starts without internet connection but something is messed up with caching - it's not working.
edited Nov 27 '18 at 11:36
answered Nov 27 '18 at 8:58
tmdoittmdoit
11
11
My app does not use Workbox either. Still not working. The thing is that few offline apps did work, for example, simpleoffline.website and currency-calc.com, weird.
– agrul
Nov 28 '18 at 10:31
Share just the crucial code on jsfiddle, I will look to it.
– tmdoit
Nov 28 '18 at 21:23
Just take the airhorner as example. Its Service Worker script is here (simple enough): airhorner.com/sw.js. If I follow the steps list in my question above, the app won't load offline. And it does not use Workbox.
– agrul
Nov 28 '18 at 23:59
I've repeated scenario and ended up with the same result. I've asked in comments about this issue bugs.webkit.org/show_bug.cgi?id=190269. Strange is that when you add it to the home screen, run it and then turn off internet connection you can still use it as standalone app - I think the webview treat webapp as a normal cached website. Thats why there are only assets/files downloaded from your visit, there are no assets/files which should be downloaded by service worker - you can test it offline.
– tmdoit
Nov 29 '18 at 18:05
here it is: bugs.webkit.org/show_bug.cgi?id=192166
– agrul
Nov 29 '18 at 19:11
add a comment |
My app does not use Workbox either. Still not working. The thing is that few offline apps did work, for example, simpleoffline.website and currency-calc.com, weird.
– agrul
Nov 28 '18 at 10:31
Share just the crucial code on jsfiddle, I will look to it.
– tmdoit
Nov 28 '18 at 21:23
Just take the airhorner as example. Its Service Worker script is here (simple enough): airhorner.com/sw.js. If I follow the steps list in my question above, the app won't load offline. And it does not use Workbox.
– agrul
Nov 28 '18 at 23:59
I've repeated scenario and ended up with the same result. I've asked in comments about this issue bugs.webkit.org/show_bug.cgi?id=190269. Strange is that when you add it to the home screen, run it and then turn off internet connection you can still use it as standalone app - I think the webview treat webapp as a normal cached website. Thats why there are only assets/files downloaded from your visit, there are no assets/files which should be downloaded by service worker - you can test it offline.
– tmdoit
Nov 29 '18 at 18:05
here it is: bugs.webkit.org/show_bug.cgi?id=192166
– agrul
Nov 29 '18 at 19:11
My app does not use Workbox either. Still not working. The thing is that few offline apps did work, for example, simpleoffline.website and currency-calc.com, weird.
– agrul
Nov 28 '18 at 10:31
My app does not use Workbox either. Still not working. The thing is that few offline apps did work, for example, simpleoffline.website and currency-calc.com, weird.
– agrul
Nov 28 '18 at 10:31
Share just the crucial code on jsfiddle, I will look to it.
– tmdoit
Nov 28 '18 at 21:23
Share just the crucial code on jsfiddle, I will look to it.
– tmdoit
Nov 28 '18 at 21:23
Just take the airhorner as example. Its Service Worker script is here (simple enough): airhorner.com/sw.js. If I follow the steps list in my question above, the app won't load offline. And it does not use Workbox.
– agrul
Nov 28 '18 at 23:59
Just take the airhorner as example. Its Service Worker script is here (simple enough): airhorner.com/sw.js. If I follow the steps list in my question above, the app won't load offline. And it does not use Workbox.
– agrul
Nov 28 '18 at 23:59
I've repeated scenario and ended up with the same result. I've asked in comments about this issue bugs.webkit.org/show_bug.cgi?id=190269. Strange is that when you add it to the home screen, run it and then turn off internet connection you can still use it as standalone app - I think the webview treat webapp as a normal cached website. Thats why there are only assets/files downloaded from your visit, there are no assets/files which should be downloaded by service worker - you can test it offline.
– tmdoit
Nov 29 '18 at 18:05
I've repeated scenario and ended up with the same result. I've asked in comments about this issue bugs.webkit.org/show_bug.cgi?id=190269. Strange is that when you add it to the home screen, run it and then turn off internet connection you can still use it as standalone app - I think the webview treat webapp as a normal cached website. Thats why there are only assets/files downloaded from your visit, there are no assets/files which should be downloaded by service worker - you can test it offline.
– tmdoit
Nov 29 '18 at 18:05
here it is: bugs.webkit.org/show_bug.cgi?id=192166
– agrul
Nov 29 '18 at 19:11
here it is: bugs.webkit.org/show_bug.cgi?id=192166
– agrul
Nov 29 '18 at 19:11
add a comment |
I faced the exact same issues.
What I realized is, all the caches are set correctly when the service worker is activated, but if you close safari with the iOS task manager (not only reduce it), all cached files get completely deleted when going back on the PWA.
add a comment |
I faced the exact same issues.
What I realized is, all the caches are set correctly when the service worker is activated, but if you close safari with the iOS task manager (not only reduce it), all cached files get completely deleted when going back on the PWA.
add a comment |
I faced the exact same issues.
What I realized is, all the caches are set correctly when the service worker is activated, but if you close safari with the iOS task manager (not only reduce it), all cached files get completely deleted when going back on the PWA.
I faced the exact same issues.
What I realized is, all the caches are set correctly when the service worker is activated, but if you close safari with the iOS task manager (not only reduce it), all cached files get completely deleted when going back on the PWA.
answered Nov 29 '18 at 23:29
AlexandreAlexandre
1
1
add a comment |
add a comment |
Indeed offline works in the Homescreen. However, the cache does not get updated on new versions & the Homescreen link stops working. To refresh the cache, one is obliged to access the web app from Safari, and then it works again. This is really sub-optimal & will hopefully be fixed.
add a comment |
Indeed offline works in the Homescreen. However, the cache does not get updated on new versions & the Homescreen link stops working. To refresh the cache, one is obliged to access the web app from Safari, and then it works again. This is really sub-optimal & will hopefully be fixed.
add a comment |
Indeed offline works in the Homescreen. However, the cache does not get updated on new versions & the Homescreen link stops working. To refresh the cache, one is obliged to access the web app from Safari, and then it works again. This is really sub-optimal & will hopefully be fixed.
Indeed offline works in the Homescreen. However, the cache does not get updated on new versions & the Homescreen link stops working. To refresh the cache, one is obliged to access the web app from Safari, and then it works again. This is really sub-optimal & will hopefully be fixed.
answered Dec 16 '18 at 19:00
JMSJMS
61
61
add a comment |
add a comment |
The issue is resolved in iOS 12.1.2 on my iPhone 6S.
add a comment |
The issue is resolved in iOS 12.1.2 on my iPhone 6S.
add a comment |
The issue is resolved in iOS 12.1.2 on my iPhone 6S.
The issue is resolved in iOS 12.1.2 on my iPhone 6S.
answered Dec 25 '18 at 1:41
agrulagrul
14
14
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53439379%2fios-12-does-not-support-offline-feature-of-some-pwas%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown