The CFID and CFTOKEN cookies, when set by Cold Fusion, are set to never expire.
When you use the cfcookie tag to set a cookie, and don't pass the "expires"
attribute, the cookie is set to expire when the browser is closed.
So this code is checking for the cookies, then explicitly resetting them so
that they will expire.
From the CFCOOKIE documentation:
Cookies written with CFCOOKIE do not get written to the cookies.txt file
until the browser session ends. Until the browser is closed, the cookie
resides in memory. If you do not have an EXPIRES attribute in a CFCOOKIE,
the cookie set exists only as long as the client browser is open. When the
browser is closed, the cookie expires. It is never written to the
cookies.txt file.
At 02:00 PM 1/25/01 -0500, you wrote:
>I am looking at this code from Hal's website and don't see how it will kill
>a session if they leave.
><cfif IsDefined("Cookie.CFID") AND IsDefined("Cookie.CFTOKEN")>
> <cfset cfid_local = Cookie.CFID>
> <cfset cftoken_local = Cookie.CFTOKEN>
> <cfcookie name="CFID" value="#cfid_local#">
> <cfcookie name="CFTOKEN" value="#cftoken_local#">
></cfif>
>
>The way it looks to me is that the cookie is continuosly filled in. So if
>they left it would already have been filled in. Anyone shed any light on
>what I obviously am not seeing or understanding.
>
>Robert Everland III
>Web Developer
>Dixon Ticonderoga
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists