01 Jan 2011

Simple HTML internet status checker

My BSNL internet connection has been especially flaky lately, so I’ve written this simple HTML script to notify me when internet is back up.

<html>
<head>
  <meta http-equiv="refresh" content="60">
</head>
<body>
  <img src="http://www.example.com/icons/a.gif" onload="location.href = 'http://www.welcometointernet.org/';">
</body>
</html>

The page tries to load an image, and if successful redirects to this site (WARNING: loud sound). If not, it tries again in 60 seconds.