'Handle error HTTP responses in Cordova Android/iOS when startup content src is remote page
I use my remote page url as a src for my cordova applicaton widget
<!-- <content src="index.html"/>-->
<content src="https://my-remote-host.com/"/>
All is fine as far as client internet connection is OK and my webserver is online.
But when my page is not loaded successfully (net::ERR_CONNECTION_REFUSED is displayed in WebView - no internet; 40x HTTP codes are sent - front-end webserver is down) user sees unfriendly page and has no way to refresh or retry automatically.
So, I want Cordova to handle no-internet page, HTTP error code pages and to render my local friendly pages (e.g. error.html, offline.html, 404.html)
Is there any way to achieve this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
