Offline mode allows user to use app when there is no Internet connection and to get better user experience when internet connection is on.
WHAT CAN BE DONE IN OFFLINE MODE ON MOBSTED PLATFORM
Mobsted PWA Offline mode allows to:
- Access the app
- View all the static data i.e. text, images, icons
- Navigate between the screens
- Work with cached Dynamic data
- Submit data:
- for iOS it will be delivered the next time the user accesses the app online
- for Android and other systems, the data will be sent when Internet connection appears, even if the app is closed.
DIFFERENCES IN OFFLINE MODE: MOBSTED VS REGULAR PWA
Mobsted platform provides own Offline mode features:
- Service Workers work properly with browsers: behavioral logic of app is stored on device and works in error-free mode
- Outgoing data calls queue: server calls are queued on device and will be sent out once app is back online
- 3 offline performance levels:
- local storage
- background sync.
HOW MOBSTED OFFLINE MODE WORKS
Platform supports Offline Mode without any interference from app user or administrator.
How that works on the technical side:
- Service Workers if Chrome is used and AppCache in case of Safari allow an app to have permanent access to:
- HTML code
- CSS styles
- Icons & images
- Inbound API requests Caching: app saves received data in indexedDB
- Outbound API requests Caching: done by using Service Worker (if supported by the browser) and indexedDB
- Caching using Service Worker allows to exchange data between PWA app and the server when app is closed and Internet connection is present.
- Requests saved to indexedDB will be sent to the server when app is opened and Internet connection is present.
Cache and indexedDB usually take about 5-15 MB of the storage on user device (much less than native apps).
HOW TO CHECK OFFLINE MODE
- Create app with a couple of screen switch actions
- Open app on device
- Check that it works properly
- Set your device to Airplane mode
- Check the app working the same way it was when online.