Hi all,
This is proving to be an informative list! I have worked out a lot of
the cold fusion portion of my latest site. Session variables are still a
mystery. How do I turn off a session? In other words, if I leave the
website and come back in an hour, or next day, I want a fresh session.
Can this be done in applications.cfm with a timer/counter? I think I
read somewhere that a session can be terminated with javascript.
Earlier, someone posted the cold fusion script below. Will that
terminate my session after 30 minutes (or do I have to modify this code
somewhat?) Any help would be greatly appreciated. BTW, what is the
philosphy of a "session"? Do customers expect their session to be
persistant over days?
Thanks!
Megan
I use this which deletes all client variables if they haven't been
accessed in 30 minutes:
<CFIF not isDefined('client.initialize_session')>
<cfset client.initialize_session = now()>
<cfelse>
<cfset app_timeout = now() - createtimespan(0,0,30,0)>
<CFIF client.initialize_session GTE app_timeout>
<cfset client.initialize_session = now()>
<CFELSE>
<cfset clientlist = GetClientVariablesList()>
<cfloop index="i" list="#clientlist#">
<cfset temp = DeleteClientVariable('#i#')>
</cfloop>
<cfset client.initialize_session = now()>
</CFIF>
</CFIF>
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.