I am trying to detect changes in window.location (for example to be notified if the user tries to reload the page) but I can't seem to find a way to do that. Are there some events associated with it?
Thanks
I am trying to detect changes in window.location (for example to be notified if the user tries to reload the page) but I can't seem to find a way to do that. Are there some events associated with it?
Thanks
The unload
event is fired when the user leaves the page. There's also a beforeunload
event in some browsers, but it's not supported in Opera.