Catch a Session Timeout?

L

Lars Netzel

Hi

I want to alert the user via a javascript alert when the Session has time
out.

how do I do this?

best regards/
Lars Netzel
 
G

Guest

You can only guess without breaking the stateless model. In most
applications, the page is either redirected to a logout after a certain
amount of time (META tags), or a timer is placed in the app that fires a
message, or both. Without querying the server, you cannot determine if a
session has timed out.

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
C

Cole Trickle

I have previously used a session variable that stores unneeded data. At the
start of every page I query the session variable and if it's empty then I
assume the session has timed out and I alert the user with a JavaScript
alert
may not be the best way but it worked for me.
hope this helps
 
L

Lars Netzel

That's a pretty good solution but unfortunately that won't work for me fully
cause I aslo want to write to a logtable What User (stored in thesession)
has times out.

I was hoping there woudl be a some sort of event when the session times out

/lars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top