powerpointranger — 2014-01-20T13:03:32-05:00 — #1
I have a local webpage that I use to consolidate a bunch of information for my coworkers. I want to be able to use the webpage to check the response from different websites that I do not own with Firefox. All I want is to make sure the website is online and not down. Is there a way I can do that with Firefox without any extensions or server sided code?
For example, if google is up then do something; if it is not then do something else.
$.ajax( "http://google.com" )
alert( "success" );
alert( "error" );
pullo — 2014-01-26T04:41:23-05:00 — #2
I don't think it'll be possible without server-side code, I'm afraid.
If you could use server-side code then you could curl a service like downforeveryoneorjustme and parse the response.
You could then use AJAX to find out if the page is up from your original page.
Otherwise, your best bet might be to look at jQuery's
$.ajax status codes, but I'm not suere how successful this might be.
If you need any help with the curl solution, let me know.