HOW TO UPDATE ADDRESS BAR WITH NEW URL WITHOUT RELOADING THE PAGE?

How to update address bar with new URL without reloading the page?

This can be achieved with all the modern web browsers –
window.history.pushState(“object or string”, “Title”, “/new-url”);

Eg: window.history.pushState(“New Page”, “New Page Title”, “/View.jsp”);
 
 
 
 
 
 
 
 
 
 
 
 
 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>