Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Window Closing event..Session expiry  RSS feed

 
Manohar Karamballi
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All!

Is there anyway to catch the event user closing window (Session end...) without using any JavaScript? Is there any API to handle this event..
TIA
Rgds
Manohar
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no there is not -- browsers don't send any request or notification to the Server when the window has been closed. Most application servers allow you to configure the "Session Timeout" value -- so you can determine what the longest is you want their data to stay alive --
You can't count on them logging out.... and even with Javascript -- you can't guarantee their browser supports it, or that they've enabled it.
-Jess

------------------
- Jessica Bradley
HP Bluestone
 
DC Dalton
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a session binding listener with this and set the time for the session to expire. I have to agree 1000% with the above answer. Ive tryed at least 10 different JavaScript versions to capture this event & it is just way too buggy and browser dependant!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!