I have a query regarding my application. Whenever user closes browser window accidentally I\'d want to do some clean up operations before that. I have used onunload event bu
From my experience onunload works differently in different browsers. Why dont you use another event handler called onbeforeunload instead. It should work. Onbeforeunload will execute first before the window closes, so that should solve your problem.