>From the teamallaire tutuorials. http://www.teamallaire.com/tutorials/

How do I kill all session variables when a user closes their browser?
The Situation: You want to make sure that when a user closes their browser,
any session variables that have been established die.

The Solution: Place this code in your application.cfm file (or your
appGlobals.cfm file if you're using Fusebox). While your user keeps their
browser open, session variables will stay alive, but will die when the
browser is closed.


<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>


----- Original Message -----
From: "Matt Rodosky" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 06, 2000 4:07 PM
Subject: Session Management


> Is it possible to terminate a session when a user closes their browser??
Its
> easy when a user logs out, or the session times out, it would be nice if
you
> could also do it when the browser is closed.
>
> TIA
> Matt
>
> --------------------------------------------------------------------------
----
> 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