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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
unloadevent is fired when the user leaves the page. There’s also abeforeunloadevent in some browsers, but it’s not supported in Opera.