> See -->
> http://www.macromedia.com/support/coldfusion/ts/documents/tn17
> 915.htm  for full explanation.
>  
> <!--- Use the following code to set per-session cookies
> instead of persistent cookies (ColdFusion TechNote 17915)
> ---> <cfapplication name="theAppName" sessionmanagement="YES"
> setclientcookies="NO" clientmanagement="NO"
> sessiontimeout="#CreateTimeSpan(0,0,20,0)#">
>
> <cflock timeout="5" throwontimeout="no" type="readonly"
> scope="session">  <cfcookie name="CFID"
> value="#SESSION.CFID#">  <cfcookie name="CFTOKEN"
> value="#SESSION.CFTOKEN#"> </cflock>

It's worth pointing out that this will set the cookies on each page request.
Rather than doing this, you can just check for the cookies' existence, and
if they don't exist, set them then:

<cfapplication ... setclientcookies="no">

<cfif not IsDefined("Cookie.CFID")>
<cflock scope="Session" type="readonly" ...>
<cfcookie name="CFID" value="#Session.CFID#">
<cfcookie name="CFTOKEN" value="#Session.CFTOKEN#">
</cflock>
</cfif>

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to