title: Redirection on AJAX success using window.location.replace()
body: <p>I am trying to redirect the page on the successful ajax call, the following code works fine,</p>
  
  <pre><code>$.ajax(
        {
        type: "POST",
        url: path,
        data: response1,
        contentType: "application/json",
        success: -&gt;
  
                   window.location.replace("http://172.16.17.141:81/configuration/manage_users")
  
        });
  </code></pre>
  
  <p>Problem with this approach is that the path I am giving is fixed, I want something like,</p>
  
  <pre><code>$.ajax(
        {
        type: "POST",
        url: path,
        data: response1,
        contentType: "application/json",
        success: -&gt;
                   alert(window.location.host + "/configuration/manage_users")#Gives right path
  
                   window.location.replace(window.location.host + "/configuration/manage_users")   
                   #Does not work, I even tried window.location.host.toString()
        });
  </code></pre>
  
  <p>The page does not redirect with the above approach and instead of the URL, the page redirects to "about:blank".</p>
  
  <p>Any help will be appreciated.</p>