Thanks...I'll try it and let you know how I get on......

-----Original Message-----
From: Matt Rodosky [mailto:[EMAIL PROTECTED]]
Sent: 10 August 2000 15:57
To: [EMAIL PROTECTED]
Subject: RE: CFAPPLICATION - Need some advice


Yes, setting the cookie without an expires attribute makes a cookie that
will expire when the browser closes. All you are doing is replacing a
persistent cookie with a session cookie. When the user closes their browser
the cookie will die and they won't be logged in if they reopen the page.
Your client variable data will build up but scheduling a purge of old data
should be easy enough.

Matt
-----Original Message-----
From: Andy Ewings [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 10, 2000 5:10 AM
To: '[EMAIL PROTECTED]'
Subject: RE: CFAPPLICATION - Need some advice


Let me see if I understand you correctly......if you create your own cookies
to store CFID and TOKEN, overwriting the ones put there by default by CF, do
these cookies automatically get destroyed when the browser is closed as
opposed to the default cookies which expire on the client when the session
expires?

The reason I am trying to do this is because I have a large site, split over
three servers (2 web and a database) and I am setting them up so they are
load balanced (so using Client variables instead of session variables).  The
site is driven by a single page that pulls in other pages and at the top of
this page there is a test to ensure the user has logged in.  I want to force
the site to log the user out when they close their browser.  If this code
does what I think your saying it does then I think it'll work....the only
problem I'll have is a build up of client variable data in the database but
I guess I can get CF to purge this on a regular basis.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 09 August 2000 23:39
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: CFAPPLICATION - Need some advice


> > Put this code in your application.cfm file. It will kill the session
> > variables when the user closes the browser:
> >
> > <!--- if the user closes their browser, make sure all sesion
> > variables get
> > killed --->
> > <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>
...
> I don't think this will do what we are hoping it will. It looks to
> me as if all it's doing is testing to see if the session is open,
> if it is it's reading the values from the cookies and then putting
> them back in there.....am I completely off the mark here??

The above code is overwriting the cookies that CF automatically creates,
which are persistent beyond the life of the browser instance, with cookies
that will be destroyed when the browser is closed. Thus, when a user closes
the browser, they destroy their link to the session variables on the server,
effectively ending their session.

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

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
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.
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
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.

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
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.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
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