Detecting if a site is online.
I want to use this for two things, one is to detect if a particular URL is online and the other is to detect if the user has an internet connection by detecting if the user can access a site that very rarely goes offline.
Basically, I want to check if the user is able to access a website like google.com and if not alert("Offline"); and if so alert("Online");
Any help would be very much appreciated.
P.S: I would not like to use XMLHttp for this.