Offline Mode

Offline mode allows to use app when there is no Internet connection.

WHAT CAN BE DONE IN OFFLINE MODE ON MOBSTED PLATFORM

Mobsted PWA Offline mode allows to:

  • Access the app

User will not be able to access the app if access restrictions are set in the app and user has never been authorized.

  • 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:

HOW MOBSTED OFFLINE MODE WORKS

Platform supports Offline Mode without any interference from app user or administrator.

How that works on the technical side:

  1. Service Workers if Chrome is used and AppCache in case of Safari allow an app to have permanent access to:

    1. HTML code

    2. CSS styles

    3. JavaScripts

    4. Icons & images

    5. Fonts

  2. Inbound API requests Caching: app saves received data in indexedDB

  3. Outbound API requests Caching: done by using Service Worker (if supported by the browser) and indexedDB, i.e.-

  • 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

  1. Create app with a couple of screen switch actions

  2. Open app on device

  3. Check that it works properly

  4. Set your device to Airplane mode

  5. Check the app working the same way it was when online.

MENTIONED ARTICLES

Last updated