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_OFFLINEin Config.java must betrue, and you need alocal-html/index.htmlfallback page for this feature to make sense.