I want to execute an action method when the user is abandoning a particular page using jQuery.
The page has the following code:
jquery .on('unload',..); was not reliable working for me. i switched over to use beforeunload. just make sure you are not returning anything, or the user will get a "are you sure to leave the page"-popup.