Change URL in Address Bar using Javascript

by Sasikumar 2014-06-25 10:36:16

To change url in address bar :
By using this we can change the url of the page in address bar without reloading the page. This can be used for ajax calls that need to change url without reloading the page.
window.history.pushState(“string”, “Title”, “/new-url”);
window.history.replaceState(“string”, “Title”, “/another-new-url”); 
1065
like
1
dislike
0
mail
flag

You must LOGIN to add comments