How to dynamically change URL without reloading? [duplicate]

Your problem can be solved by implementing the History API, especially by using the pushState() method. I recommend reading about it in MDN. There’s also an all-in-one solution called History.js, it will help you implement it x-browser easily (It will fallback to URL hashes # if the browser doesn’t support it).

Here’s an example:

history.pushState('', 'New Page Title', newHREF);

Not excited enough? Here’s a demo that will encourage you to implement it.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)