I need to check if a URL (www.google.com / www.googlesss.com)exists. we support various browsers (IE, Chrome, Firefox etc...) so the solution needs to be able to support all of those.
I.E
var backendUrl = "https://www.google.co.in";
$.ajax({
type: "POST",
url: backendUrl
}).done(function (result) {
console.log("working");
}).fail(function () {
alert("Sorry URL is not access able");
});
Output:
if backendUrl = "https://www.google.co.in"; then return working if backendUrl = "https://www.yahoo.co.in"; then return working if backendUrl = "https://www.googlessss.co.in"; then Sorry URL is not access able