Update javascript-modify-url-without-reload.md

This commit is contained in:
Angelos Chalaris
2020-03-27 17:37:16 +02:00
committed by GitHub
parent b3d9ba0e2d
commit 8b2acd81e3

View File

@ -37,7 +37,7 @@ const nextURL = 'https://my-website.com/page_b';
// This will create a new entry in the browser's history, reloading afterwards
window.location.href = nextURL;
// This will replace the current entry in the browser's history, reloading afterwards
// This will replace the current entry in the browser's history, reloading afterwards
window.location.assign(nextURL);
// This will replace the current entry in the browser's history, reloading afterwards