i want to show an offline page in my PWA that's made with ionic 3.9, network native plugin doesn't support browser, so we can't use network in PWA, how i can show angular offline page when the phone's internet connection switched off ?
Asked
Active
Viewed 543 times
1 Answers
1
Based from this blog, a PWA should be able to do some work offline using service workers.
Service workers essentially act as proxy servers that sit between web applications, the browser, and the network (when available). They are intended, among other things, to enable the creation of effective offline experiences, intercept network requests and take appropriate action based on whether the network is available, and update assets residing on the server.
Check this Offline Storage for Progressive Web Apps documentation.
- For the network resources necessary to load your app while offline, use the Cache API (part of service workers).
- For all other data, use IndexedDB (with a promises wrapper).

abielita
- 13,147
- 2
- 17
- 59