WebViewGold Documentation · Android
🇺🇸 English
Get WebViewGold

Reconnect API

Reload the last online URL from your offline / fallback HTML page — the perfect "Try again" button for your custom offline screen.

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 non-helper 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:

  • FALLBACK_USE_LOCAL_HTML_FOLDER_IF_OFFLINE in Config.java must be true, and you need a local-html/index.html fallback page for this feature to make sense.

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 →