Currently, im using the js line below to load website in my HTML page.
window.location = 'http://example.com';
How can I use jQuery / AJAX to load only if http://example.com
return HTTP status 200, and display another page if something went wrong like ERROR 500, 504....etc.