Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy Question on Session Timeouts 1

Status
Not open for further replies.

dakota81

Technical User
May 15, 2001
1,691
US
I'm still learning & would like to know: let's say I've got the timespan set at the default 20 minutes for session variables. Is that 20 minutes from the time a particular variable is initially written, or 20 minutes from the last time it was written or read?

For instance, I want to keep a session scope variable with the user's initials. In my application.cfm file I will check if that variable exists & if so, the user is properly logged in, else I'll cut out and send them to the login page.

So when checking the session variables, will I need to be re-writing the variables or not to allow the users to continue using the app without interruption granted they're not idle for more than 20 minutes?
 
Yes, right!
20 minutes from the last time it was written or read.
As far as I know, the session variables stays even if they are expired. CF will checked wether the variables are expired or not. If you want to, you can kill the variables using other CF Tag.

regards,
mansii
 
Just a clarification -- the session variables persist as long as the session is alive. The session counter is reset any time a page is requested in that session. So, it's not necessary to read or write to a session variable in each page just to keep it "alive" -- as long as the user is requesting at least one page from your application every 20 minutes or less (given your example), all variables you have created in that session will be preserved.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top