File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Close or redirect after inactivity

 
Raj Puri
Ranch Hand
Posts: 189
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am looking for help on redirecting or closing the session after certain minutes of inactvity on client side. My code is all HTML based so makes sense to implement this using Javascript. Any clues?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
easiest way is to do this:


It will redirect the user after a set time. This could also be done with Meta Tags. You can also develop a function that detetcs user interaction and resets the timer, but that is a little more advanced.

Eric
 
Raj Puri
Ranch Hand
Posts: 189
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems setTimeout meerly sets the timeout does not really detect inactivity?I tried this one and redirects after certain time whether I am active or not.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I said is you would have to build a funciton that determines if the user performs any actions on the window. It would be rather complicated and I am too busy to do it.

Eric
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did a good search...I have no tested or tried this:

http://www.tek-tips.com/faqs.cfm?fid=2700

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic