isSiteOnline("http://www.facebook.com",function(found){ if(found) { // site is online } else { // site is offline (or favicon not found, or server is too slow) } })