I have an HTML file stored on the local file system. I need it to redirect (or otherwise display in some way) the remote website ONLY if the site is accessible and accessible. If the site is unavailable, I need to display a user-friendly message.
I currently have:
<html>
<body onload="window.location.href='http://someserver/';">
<p>Connecting to remote server...</p>
</body>
</html>
The problem is that if the server is unavailable, the user is presented with the ugly page "cannot find server" from a web browser. I would prefer to display some custom HTML indicating the situation to the user if page navigation has occurred. What are some commonly used solutions that I should try, will this work well for this?
Requirement: It must work in IE6 through IE9. FireFox / WebKit engines will not be used for this application.
source
share