Offline PWA Apps

Updated 8 months ago by Mobsted Support V

Now let's move on to the Offline mode in Mobsted PWA Apps.

Why do we have Offline mode?

Offline mode allows the AppUser to use the App even with no internet connection as well as to have the better user experience with the internet connection on.

How does Offline mode work in Mobsted?

In order to make the App working Mobsted system performs all the required steps automatically, but in order for you to get familiar with the process the steps are listed below.

  1. Caching the HTML code, CSS styles and JavaScripts as well as Icon images, fonts and icons to the AppUser device. The cashing is done using Service Worker if the browser supports Service Workers (Chrome) or using the AppCache in case the browser doesn't support Service Worker yet (Safari).
  2. Caching data received when requesting our api (will be saved in indexedDB)
  3. Caching the data sent. This would be done using the Service Worker (if supported by the browser) and indexedDB.
    1. Caching using Service Worker allows to exchange data between PWA App and the Server even if the App is closed and the internet connection is present.
    2. Requests saved to indexedDB would be send to the server if the App is opened and the internet connection is present.

Cache and indexedDB usually takes about 5-15 of the storage on the AppUser smartphone. Much less than native Apps.

What can be done when Offline?

When Offline the AppUser can:

  • Open the app
    If you have identity authentication turned on and the AppUser was never authorized OR the AppUser needs to authorize every time the App is opened, AppUser would not be able to access the App.

  • View all the static data like fonts, images, icons, etc.,
  • Navigation between the screens
  • Dynamic data

iOS users can enter data; data will be sent to the server the next time they access the App online; for Android and other systems, the data will be sent when the Internet connection appears, even if the App is closed.

Was it useful?