Is there a way to detect the page's url change without using onhashchange? Because the url I'm trying to detect does not contain a hash. I tried add a listener on the window, like below, but it did not work. Many thanks!
<script type="text/javascript">
window.addEventListener("onpageshow", myFunction); //this does not detect url change for me
function myFunction() {
console.log("url changed " );
}
</script>