RE: CFMX - How do i end client variable state at browser close?

2004-03-01 Thread Dave Watts
 I use CLIENT variables to maintain state in an application 
 for when a user logs in, for example. I want the variable 
 state to be lost when the browser closes. What is the *best* 
 way to ensure that the CFID and CFTOKEN cookies expire when
 the browser closes? CFMX seems to be dropping permanent cookies
 by default. That means that when the user returns to the 
 site, they are still logged in even after they quit the browser...

You'll need to write the cookies yourself:

cfapplication ... setclientcookies=no

cfif not IsDefined(Cookie.CFID)
	cfcookie name=CFID value=#Client.CFID#
	cfcookie name=CFTOKEN value=#Client.CFTOKEN#
/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]




RE: CFMX - How do i end client variable state at browser close?

2004-03-01 Thread Jon Block
Dave,

Thanks I knew that trick... was curious if there was a better CFMX way...

Thanks,
Jon
-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED]
Sent: Monday, March 01, 2004 12:31 PM
To: CF-Talk
Subject: RE: CFMX - How do i end client variable state at browser close?

 I use CLIENT variables to maintain state in an application
 for when a user logs in, for example. I want the variable
 state to be lost when the browser closes. What is the *best*
 way to ensure that the CFID and CFTOKEN cookies expire when
 the browser closes? CFMX seems to be dropping permanent cookies
 by default. That means that when the user returns to the
 site, they are still logged in even after they quit the browser...

You'll need to write the cookies yourself:

cfapplication ... setclientcookies=no

cfif not IsDefined(Cookie.CFID)
cfcookie name=CFID value=#Client.CFID#
cfcookie name=CFTOKEN value=#Client.CFTOKEN#
/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]




RE: CFMX - How do i end client variable state at browser close?

2004-03-01 Thread Dave Watts
 Thanks I knew that trick... was curious if there was a better 
 CFMX way...

If you can use Session variables instead of Client variables, you can use
J2EE sessions in CFMX, which use a session cookie as their token.

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]