Che, You should also run this code to clear out the session for that user: <cfloop collection="#session#" item="Key"> <cfif not ListFindNoCase('CFID,CFToken,SessionID,JSessionID',Key)> <cfset StructDelete(session,Key)> </cfif> </cfloop> -Aaron
-----Original Message----- From: Aaron Wolfe [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 25, 2007 3:09 PM To: CF-Talk Subject: RE: Clearing the Cookie that gets set when using Client variables. 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Check out the new features and enhancements in the latest product release - download the "What's New PDF" now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284572 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4