title: angularjs/JS Update url querystring without refresh/load
body: <p>I want update the url without page reloading or refresh. I've tried with below logic but no luck. Every time page is loading. Any help please?</p>
  
  <pre><code>  var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?k=' + vm.name + '&amp;l=' + vm.sid;
              //var newurl = $location.protocol() + "//" + $location.host() + $location.path() + '?k=' + vm.name + '&amp;l=' + vm.sid
              //window.history.pushState({ path: newurl }, '', newurl);
              //window.history.replaceState(null, null, newurl);
              //window.location.hash = 'k=' + vm.name + '&amp;l=' + vm.sid
              //document.location = newurl;
  </code></pre>