javascript modify url without reloading page

JavaScript
window.history.pushState('', 'New Page Title', '/new-url.php');
Source

Also in JavaScript: