• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need to capture browser close button in all browsers

 
syruss kumar
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a scenario that i need to clear the user session when he clicks the browser's close button .I have done that by capturing the position of close button in the browser but now i have a problem that i have tried in IE 6,7,8 .The application is working fine in 6 but not in 7,8.The position of close button may have changed .

How can i get to know that user has clicked the close button in all browsers like IE 6,7,8 and firefox?

Thanks in advance.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not going to happen, not going to happen. What about browser errors, lost internet connections, ctrl-w, ctrl-alt-delete, user typing different address, etc? You can not catch all of the ways to close the browser window. You can not make a web application act like a client application. If you want to try to do it : some code Eric
 
syruss kumar
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Eric
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic