WebViewGold Documentation · iOS
🇺🇸 English
Get WebViewGold

Reconnect API

Add a "Try again" button to your offline fallback page that reloads the last online URL of your iOS app.

The Reconnect API reloads the last online URL the user was on before your app fell back to the offline HTML page. It is designed as a "Try again" button on your custom offline / fallback screen.

How to Use:

Add the trigger to your offline page (typically local-html/index.html):

<button onclick="window.location.href='reconnect://'">Try to reconnect</button>

How It Works:

The app remembers the last URL that was loaded successfully. When the user taps reconnect://, the WebView navigates back to that URL. If connectivity is still down, your fallback page is shown again.

Related Config:

  • offlinelocalhtmlswitch in Config.swift must be set to true, and you need a local-html/index.html fallback page for this feature to make sense. See Set up your web app for details on the offline fallback mode.

Too busy? We set up your app for you.

Our team configures, builds & submits your WebViewGold app — done-for-you, fast turnaround, Made in Germany.

Get your app set up →

Build in your browser

No Mac, no IDE: the WebViewGold Cloud Builder configures, builds & uploads your app online.

Discover Cloud Builder →