title: Javascript - refresh current tab with http response
body: <p>I am sending <code>http</code> request to my server and the response is a html:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;link rel = "stylesheet" type="text/css" href="CSS/jQUERYUI.css"&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id = "first"&gt;
  data : someData
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I want the current page will refresh with the response data so I tried:</p>
  
  <pre><code>$http({
    method: 'POST',
    url: '/someUrl'
  }).then(function(response) {
        var win = window.open(window.location.href, '_blank');
        $(win.document.body).html(response.data)
    }, function(error) {
  
    });
  </code></pre>
  
  <p>And some of the 535 ways to reload page using js <a href="https://stackoverflow.com/questions/5294842/refresh-a-page-using-javascript-or-html">535-ways-to-reload</a>.
  Still I was not able to reload the current page with the response html.</p>
  
  <p>Also I want the the url of the current page won't change.
  <code>angularjs</code> ways to do so will be great as well.</p>
  
  <p>Thanks for ant help.</p>