How do I handle the scenario where I making a synchronous request to the server using XMLHttpRequest and the server is not available?
xmlhttp.open('POST','Page.aspx',false); xmlhttp.send(null);
Right now this scenario results into a JavaScript error: ‘The system cannot locate the resource specified’
Ok I resolved it by using try…catch around xmlhttprequest.send
: