how to detect a url change code example
Example: how to detect a url change
window.addEventListener('popstate', function (event) {
// The URL changed...
});
window.addEventListener('popstate', function (event) {
// The URL changed...
});