Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

session timeout

 
robbie keane
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using javascript, how do I warn people when their session is about to expire?

Thanks.
Robbie
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote an article on it here.

Eric
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ooppps: http://radio.javaranch.com/pascarello/2005/10/25/1130246930301.html

there is the link
 
Sanjiv Jivan
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The article is very useful. In my web app I have the browser client poll every minute for notification messages (via AJAX). As a result the users' session never expires and so I can't simply query my server side session to find out if the session is about the expire. I am using JSP/Servlets on the server side. I would almost like the polling client to be a separate session and not interfere with the "main" user session. Any ideas on how I can resolve this?

Thanks,
Sanjiv
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had another article on that topic: http://radio.javaranch.com/pascarello/2005/10/31/1130778395760.html

hopefully that answers questions.

Eric
 
Sanjiv Jivan
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks! Good to see that others have thought about this problem as well. I'll just implement this using a servlet filter that updates the timestamp if the request in not a poll request.

Sanjiv
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic