> I am experiencing difficulties in setting client cookies using
> the Application.cfm and <CFAPPLICATION> tag. I have a timeout
> specified within the tag, but the cookie is not expiring on the
> client. The one foreseeable problem here is that the server does
> not run specific security contexts. That said, we ARE able to set
> session variables and distinguish authorized from unauthorized
> access - just not expire the cookie automatically. Any help would
> be appreciated.

By default, the cookies that CFAPPLICATION automatically creates will
outlast the length of the session with which they're associated. This
doesn't really matter, generally. However, if you need your cookies to last
only while the user has the browser open, you can set the CFAPPLICATION tag
so that it doesn't create cookies, and do it yourself in application.cfm:

<CFAPPLICATION NAME="myapp" SESSIONMANAGEMENT="Yes" SETCLIENTCOOKIES="NO">

<CFIF NOT IsDefined("Cookie.CFID")>
        <CFLOCK TIMEOUT="1" THROWONTIMEOUT="No" TYPE="READONLY" SCOPE="SESSION">
                <CFCOOKIE NAME="CFID" VALUE="#Session.CFID#">
                <CFCOOKIE NAME="CFTOKEN" VALUE="#Session.CFTOKEN#">
        </CFLOCK>
</CFIF>

By omitting the EXPIRES parameter, the cookies will only last while the
browser is open.

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

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to