www.webdeveloper.com
Results 1 to 15 of 17

Thread: Detecting if a site is online.

Threaded View

  1. #1
    Join Date
    May 2009
    Posts
    5

    Exclamation Detecting if a site is online.

    Hello everyone, I was wondering if it is possible to detect if a site is online using JavaScript. For example if google.com is online then alert("Online"); and if google.com is offline then alert("Offline");

    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.

    - Chris

    P.S: I would not like to use XMLHttp for this.
    Last edited by Chris252; 05-14-2009 at 08:38 PM. Reason: Add the P.S

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles