Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trap window close event for IE browser

 
Imran Mirza
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When a user logs on or logoff, I add their name to a database.

If a user clicks on the application logoff button, all is well. If they just close the browser window, then they are left in a logged on state as far as the server is concerned and will remain that way until the server side is restarted.


How to capture user logoff time in case when X button or Alt-F4 or referesh button is cliek? Also what will happend in case of multiwindow?

Thanks in advance.
Imran Mirza
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cna not catch the browser, you neeed to learn how to make the users session expire after X amount of minutes on the server side.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic