javascript change query parameter without reloading

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

Also in JavaScript: