Che,

Here is one way to do it.  Use the code within this tag <!--- Run this
code only when you want to expire the login --->  to expire the login:

<!--- Application is created --->

<cfapplication name="test" sessionmanagement="yes"
sessiontimeout="#CreateTimeSpan(0,4,0,0)#" setclientcookies="yes">

<!--- /Application is created --->

 

<!--- Dump the cookies to see the Current
CFID/CTOKEN/SESSIONID/JSESSIONID --->

<cfdump var="#cookie#">

<!--- /Dump the cookies to see the Current
CFID/CTOKEN/SESSIONID/JSESSIONID --->

 

<!--- If the variables in the cookie exist, expire them now --->

<!--- Run this code only when you want to expire the login --->

<cfif isdefined("cookie.cfid")>

            <cfcookie name="CFID" expires="now">

</cfif>

<cfif isdefined("cookie.cftoken")>

            <cfcookie name="CFTOKEN" expires="now">

</cfif>

<cfif isdefined("cookie.sessionid")>

            <cfcookie name="SESSIONID" expires="now">

</cfif>

<cfif isdefined("cookie.jsessionid")>

            <cfcookie name="JSESSIONID" expires="now">

</cfif>

<!--- /Run this code only when you want to expire the login --->

<!--- /If the variables in the cookie exist, expire them now --->

 

<!--- Dump the cookies to see the Current
CFID/CTOKEN/SESSIONID/JSESSIONID which will be [emtyp strings]--->

<cfdump var="#cookie#">

<!--- /Dump the cookies to see the Current
CFID/CTOKEN/SESSIONID/JSESSIONID which will be [emtyp strings]--->

 

<!--- The next time the browser hits the application, the cfid/ctoken
will be reset --->

 

If you want it to be more robust, you can read the cookie variables in
and then loop over the variables to expire them.

-Aaron

 

-----Original Message-----
From: Che Vilnonis [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 25, 2007 10:31 AM
To: CF-Talk
Subject: Clearing the Cookie that gets set when using Client variables.

 

This should be and easy question. How do I programmatically clear/remove
the

browser's cookie that gets set when using Client variables?

I need to generate a new CFID/CFTOKEN when a user logs out of and older

application.

 

Thanks, Che

 

 

 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284559
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to