title: Check for Redirect url is correct or not?
body: <p>I am calling window.location.href = "some url";</p>
  
  <p>I want to check whether that url is opening or not. Means if the url is wrong how do check it in javascript so that I can redirect it to another url.</p>
  
  <p>Thanks.</p>