
App Studio: offline page configuration
Offline page behavior
- Enabled (Default): After the timeout, an offline page is shown.
- Disabled: The app displays the last cached version of the webpage. If no cached page exists (e.g., for new users), the app will show a default browser error (iOS WKWebView or Android WebView).
Custom offline pages
Instead of using the default offline page, you can configure a custom offline page for both iOS and Android platforms. Since this page is shown without internet access, all assets must be self-contained:- Inline all CSS and JavaScript
- Use Base64-encoded or SVG images
Use your AI agent
Use the Median MCP with your AI agent to replace the offline page with your own HTML. See Median MCP server to set it up.
The MCP can’t read your current offline page, so give your agent the complete HTML you want.Custom offline page as initial URL
To use a custom offline page as the app’s initial launch screen, please set theinitialURL in the App Configuration to file:///offline.html.
Manual page reload
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. This can be implemented using the following JavaScript Bridge command:Example offline pages
Default offline page
Custom offline page example
The following example outlines how to include PNG and SVG encoded images in the offline page.Localized offline page example
The following example translates the text and buttons of the default offline page to French, Spanish, or Korean based on the device language. Any other languages will default to the English offline page.Advanced strategies
Service workers
Use service workers on your website to cache content, so users can access it
in your app while offline.
Native Datastore
Save data in App Storage while the device is offline, then sync it with your
backend when the user is back online. Use App Storage for this, because
Cloud Storage isn’t available offline.
Offline download manager
Download documents and media files to the user’s device for offline access.
Users can browse them in a built-in file manager, or you can access them
programmatically.
OfflineSync
For apps that work entirely without internet access, such as sales catalogs
or in-store kiosks. Contact us to learn more.