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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ending session when browser is closed

Status
Not open for further replies.

DrumAt5280

Technical User
Sep 8, 2003
194
US
I will like to kill my sessions variables once the browser closes on CF7 (i don't use client variables).

Code:
<CFAPPLICATION NAME="test" 
	sessionmanagement="yes" 
	setclientcookies="no"
	sessiontimeout="#CreateTimeSpan(0,0,20,00)#">
<!--- preserve session variables only until browser closes --->
<cfset Cookie.cfid = SESSION.cfid>
<cfset Cookie.cftoken = SESSION.cftoken>

Why is this not working in my Application.cfm file?
 
this is MM's answer. try this.

<cfif isdefined("cookie.CFID") and isdefined("cookie.CFTOKEN")>
<cfset tempCFID = cookie.CFID >
<cfset tempCFTOKEN = cookie.cftoken >
<cfcookie name="CFID" value="#tempCFID#" >
<cfcookie name="CFTOKEN" value="#tempCFTOKEN#" >
</cfif>

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
I have tried that one before without success - the darn session will not die.

Do i have some thing wrong here:

Code:
<CFAPPLICATION NAME="rentvine" 
	sessionmanagement="yes" 
	setclientcookies="no"
	sessiontimeout="#CreateTimeSpan(0,0,30,0)#">
 
try setclientcookies="yes"

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top