> By putting the following code in your Application.cfm it 
> does exactly the same thing. when you create a client var 
> CF puts an expirey time on the cookie equal to the time 
> in the CF administrator.  

That's not exactly correct. The CFID and CFTOKEN cookies, by default, are
essentially "permanent" cookies, with an expiration date twenty years or so
from now.

> If you want it to expire when the browser closes then this 
> will do it:
> 
> <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>  

This will overwrite the cookies set by CF with your own "session" cookies,
which will be discarded by the browser when it's closed. However, it's worth
noting that this will rewrite the cookies on every page request, which isn't
really necessary. You can simply write them once, by setting the
SETCLIENTCOOKIE attribute of CFAPPLICATION to "false" or "no", and then
creating your own CFID and CFTOKEN "session" cookies with the appropriate
CFID and CFTOKEN values from the Client or Session scope.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to