How to change browser address bar without reloading page - HTML/Javascript

developerbaba


The most effective method to change program location bar without reloading page - HTML/Javascript.


By using:
window.history.pushState("string", "Title", "newUrl");
This is new in HTML 5. 

Your url will change to newUrl without reloading the page. 


Note: title arg in the technique won't change the Title of the html page. This is utilized to name the page in the program history, incase u about-face and afterward go ahead.
Oldest

ConversionConversion EmoticonEmoticon

:)
:(
=(
^_^
:D
=D
=)D
|o|
@@,
;)
:-bd
:-d
:p
:ng
:lv