> ## Documentation Index
> Fetch the complete documentation index at: https://docs.median.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Offline page

> Show a default or custom offline page when your app loses its connection, and set how long the app waits before showing it.

By default, the offline timeout is set to 10 seconds, but you can customize this value to suit your needs. However, increasing the timeout duration may degrade user experience, as it will delay visual feedback when the app is trying to establish a connection.

![Offline page settings in App Studio](https://mintcdn.com/median-co/TpSItjrYpkPK-i0N/images/docs/af097054b495c469d0faaf73d8895e42b44d453e97f6a0b725f0600ec51ae0c2-Screenshot_2025-07-04_at_11.44.50.png?fit=max\&auto=format\&n=TpSItjrYpkPK-i0N\&q=85\&s=ccbdf68572e43e9c031242e0f4dcd8e4)

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

> [!TIP]
>
> **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](https://docs.median.co/docs/mcp-server.md) 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 the `initialURL` in the [App Configuration](https://docs.median.co/docs/app-configuration-appconfigjson.md) 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:

Median JavaScript Bridge

```javascript JavaScript  theme={null}
median.webview.reload(); 
```

## Example offline pages

### Default offline page

[Default offline page](https://codepen.io/gonative/embed/LYrpOKz?default-tab=result)

### Custom offline page example

The following example outlines how to include PNG and SVG encoded images in the offline page.

[Custom offline page](https://codepen.io/gonative/embed/poWbXPN?default-tab=result)

### 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.

[Localized offline page](https://codepen.io/gonative/embed/OPNNxbw?default-tab=result)

## Advanced strategies

> [card] [Service workers](https://docs.median.co/docs/service-workers.md)
>
> Use service workers on your website to cache content, so users can access it
> in your app while offline.

> [card] [Native Datastore](https://docs.median.co/docs/native-datastore-offline.md)
>
> 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.

> [card] [Offline download manager](https://docs.median.co/docs/offline-download-manager.md)
>
> 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.

> [card] [OfflineSync](https://median.co/contact?topic=sales-inquiry)
>
> For apps that work entirely without internet access, such as sales catalogs
> or in-store kiosks. Contact us to learn more.


## Related topics

- [Offline download manager](https://docs.median.co/docs/offline-download-manager.md)
- [Native datastore offline](https://docs.median.co/docs/native-datastore-offline.md)
- [Changelog archive](https://docs.median.co/docs/changelog-archive.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.