What I'm getting is that you want to ensure a user is logged out when
they close their browser, is that right?

There are two ways to do that that are very easy and don't require
anything exotic like what you're thinking.

If you're on CFMX or MX7, and have access to the ColdFusion
Administrator, change to use J2EE session variables. (Server Settings |
Memory Variables | Use J2EE session variables)

The J2EE session variable uses a session cookie rather than persistent
cookies like the traditional CFID/CFTOKEN. When the browser is closed
the cookie is discarded and visiting the site again will start a new
session.

If you're on an older version or don't have access to the CF
Administrator, you can do the same thing by converting the CFID/CFTOKEN
to session cookies. In your Application.cfm add something like the
following:

<cfif isDefined("cookie.CFID">
        <cfcookie name="CFID" value="#cookie.CFID#">
</cfif>
<cfif isDefined("cookie.CFTOKEN">
        <cfcookie name="CFTOKEN" value="#cookie.CFTOKEN#">
</cfif>


-----Original Message-----
From: Patrick Forsythe [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 12, 2006 4:29 PM
To: CF-Talk
Subject: Set Variable on window close

The problem I have is that the site I am has a long session time out
like 8 hours. The problem I am having is that in ie on win 98 if you
login, and close the window it allows you back in the site with out
requiring an additional login. So what I want to know is is there a way
to set a coldfusion variable once a page exits. I was thinking about
using javascript to pop up a window that sets my variable but if the
have a pop up blocker that might not work. I am looking for any
suggestions here.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237667
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to