Bug 192166

Summary: iOS 12 does not support offline feature of some PWAs
Product: WebKit Reporter: agrul
Component: Service WorkersAssignee: Nobody <webkit-unassigned>
Severity: Major CC: acombemorel, cdumez, etienne.maheu, informes, tomac, webkit-bug-importer, webkit, youennf
Priority: P2 Keywords: InRadar
Version: Safari 12   
Hardware: iPhone / iPad   
OS: iOS 12   

Description agrul 2018-11-29 11:09:21 PST
iOS 12 Safari does not support the offline feature of some PWAs (Progressive Web App). It seems like Service Worker is not working 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 (https://airhorner.com/)

And these two:
2048 puzzle (https://2048-opera-pwa.surge.sh/)
Voice Memos (https://voice-memos.appspot.com/)

Steps to reproduce (100% reproducible):

1. visit the PWA with Safari (iOS 12 or 12.1)
2. close the PWA tab in Safari
3. push home button on iPhone to set Safari to background
4. push the iPhone power button to turn off screen
5. push the iPhone power button again to wake up the phone
6. turn off all the network connection from the iPhone control center (both wifi and cellular)
7. open Safari, visit PWA again --> the web app fail to load [expectation: app should run offline]

However, some other offline apps seems work well, for example: 

I also created a question on stackoverflow for it earlier:
Comment 1 Radar WebKit Bug Importer 2018-11-29 14:09:20 PST
Comment 2 Alexandre C 2018-11-29 15:25:56 PST
Same problem here.
Test iOS 12, 12.1 any devices:
the files cached get completely cleared after closing safari through the task manager.

It seems to be a critical issue in my opinion.
Comment 3 Etienne Maheu 2018-12-03 11:11:18 PST
Bearing in mind this ( https://bugs.webkit.org/show_bug.cgi?id=190269 ) issue, the service worker works as expected when the app is pinned to the home screen. Is this Safari only?
Comment 4 agrul 2018-12-03 11:29:34 PST
According to Chris Dumez 2018-11-27 09:09:04 PST: "The fix did not ship in 12.1 so it is not surprising you are still experiencing the issue. Please give it some time.". Currently only Apple folks can verify if this is fixed by applying the patch from https://bugs.webkit.org/show_bug.cgi?id=190269
Comment 5 agrul 2018-12-24 17:46:46 PST
The issue is resolved in iOS 12.1.2 on my iPhone 6S.
Comment 6 youenn fablet 2019-01-04 10:23:43 PST
Closing it as a duplicate of 190269.
Please reopen if additional issues are tracked there.

*** This bug has been marked as a duplicate of bug 190269 ***
Comment 7 srrevilla 2019-01-30 04:29:03 PST
Consultar el precio del dólar en Perú
Tipo de Cambio, Conversor Moneda.