I have developed and packaged an offline Cordova-based HTML5 App for Android. It works fine, and some of the resources are accessed locally without an internet connection while other require an internet connection. A problem kicks in when the internet connection is down because it displays a Webpage, not available error together with the URL.
I have tried adding this to my HTML page, but it does not work
<img src='http://www.example.com/mobile/index.html' onerror='alert("Connection dead");' />
What problem is there with the above code?