Offline Page

πŸ“˜

Customize the offline page that will be shown when your app is offline.

An offline page will be displayed within your app when the user's device is offline for the duration of a configurable connection offline timeout.

The offline page can be disabled if desired. Should the offline page be disabled, the app will display the previously cached version of the webpage. Please note that new users of your app may only see the standard error message of iOS WKWebView and Android WebView components, as there is no cached website to fall back on.

Or rather than the default offline page you may configure a custom page in iOS and Android. As the offline page will be shown when the device is not connected to the internet, you must include all required CSS and JavaScript inline and embed any images using base64 data or use SVG images.

When using a custom offline page you may wish to configure it to be the page initially loaded when the app launches. To do so, set your app initialURL to file:///offline.html. You may also wish to include a button to manually attempt to reload the page, for instance after the user connects to WiFi or VPN. To do so, use the JavaScript Bridge function as follows:

↔️Median JavaScript Bridge

Reload the webview page:

median.webview.reload();

Default Offline Page

Custom Offline Page Example