> Is there a means of determining if a CF session has timed out?

Typically when I see systems that use the "Your session has timed out"
message, it's a _javascript_ driven thing.  Google a bit and you should be
able to find something, or you can write your own.

Essentially what you want to do is set up a dialog box that appears a few
minutes before the end of the session timeout you specified in the
cfapplication tag.  Sometimes the user can "click to continue session" and
some hidden frame is refreshed to keep the session alive and reset the JS
timer.  Sometimes, it just tells you "you're outta luck (and time) buddy".

As far as a CF solution, I suppose you could set a cookie timestamp with
each pageview and compare times to see if it's beyond the session timeout on
each request.  Though that solution might be tricky and seems like it would
be prone to error.

-Cameron

-----------------
Cameron Childress
Sumo Consulting Inc
---
land:  858.509.3098
cell:  678.637.5072
aim:   cameroncf
email: [EMAIL PROTECTED]

-----Original Message-----
From: Jim McAtee [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 10, 2004 2:03 PM
To: CF-Talk
Subject: How to tell if a session has expired?

Is there a means of determining if a CF session has timed out?  For
instance,
in the context of a shopping cart application.  I've seen applications on
other sites where you get a message to the effect of "Your session has
expired" rather than just a "Your shopping cart is empty".  I'm trying to
figure out how to do this.

I can check to see if certain session variables exist, but can't think of a
way to tell whether they were never set or if they existed at one time and
have now "gone away" due to the session expiring.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to