i cant find a good documentation to help. im trying to reach the new assigned url of a user who navigates away from a page. therefore im trying to understand what really happens when you change the URL.
so, when im assigning url with one of the following inside an event listner: button.addEventListener("click", function () { window.location.href = "something" or window.location.replace("something") or window.location.assign("something")
when im checking immediately after assigning the url (with beforeUnLoad, unLoad, pageHide etc) the window.location.href hasn't been changed.
i guessed it would be something like -
- you replace the location using some method
- the call is being handled with external api (maybe with the browser engine)
- the browser starts the process of unloading the page (until then, the new url is hidden and not saved anywhere on the closing page)
- when the new page loads, it will be opened with the new url
i would appreciate approval or corrections to my guess.
any ideas of how to get users new URL from the closing page (when the URL was assigned with eventListner, not with HTML a href) would be of a great help.
thanks
Aucun commentaire:
Enregistrer un commentaire