Reputation: 857
I hav onUnload="cleanup()" defined in my html body tag. The cleanup() method in javascript is
function cleanup() {--clean up session--}.But when the browser is terminated by killing the process using task manager, I want to do the same action as cleanup. How can this be done?
Upvotes: 0
Views: 425
Reputation: 8020
You cannot. If the process is forcefully killed, nobody cares about your scripts.
Upvotes: 2