Bryan, you're taking a beating today ;D
Your post isn't correct, as was pointed out by another user.
Run this sample code in its own folder, creating application.cfm and index.cfm. To
test this properly you must set client management to Yes, run the file and close the
browser *immediately*. Then set client mgmt off and comment out the cookie stuff.
This will flush out cfid and cftoken from your 127.0.0.1 cookie and kill cf server's
ability to figure out who you are.
Your example would work on a dev server whose 127.0.0.1 cfid and cftoken cookies are
long-since instantiated regardless of whether or not you enable client management on
your current app.
Once you flush the cookies you'll see that state isn't maintained unless you use the
second link in the example file.
---------------------------------------
Matt Robertson [EMAIL PROTECTED]
MSB Designs, Inc., www.mysecretbase.com
---------------------------------------
<CFAPPLICATION NAME="MYTEST_X"
SESSIONMANAGEMENT="yes"
CLIENTMANAGEMENT="no"
SETCLIENTCOOKIES="No">
<!---
<cfcookie name="CFID" value="#cookie.cfid#">
<cfcookie name="CFTOKEN" value="#cookie.cftoken#">
--->
<CFIF isdefined ("url.action")>
<CFLOCK SCOPE="SESSION" TYPE="EXCLUSIVE" TIMEOUT="10">
<CFSET session.myvar="SESSION VAR INSTANTIATED">
</CFLOCK>
</CFIF>
<html><head><title></title></head><body>
click this <A HREF="index.cfm">link</A><P>
<CFOUTPUT>
<CFLOCK SCOPE="SESSION" TYPE="READONLY" TIMEOUT="10">
Now click <A HREF="index.cfm?CFID=#session.cfid#&cftoken=#session.cftoken#">this
one</A><P>
#session.CFID# and #session.cftoken#<P>
Click <A HREF="index.cfm?action=1">here</A> to set a session variable<P>
<CFIF isdefined ("session.myvar")>
#session.myvar#
</CFIF>
</CFLOCK>
</CFOUTPUT>
</body></html>
---------- Original Message ----------------------------------
from: Bryan Love <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
date: Wed, 20 Mar 2002 14:18:48 -0800
Very well then.
In your CFapplication tag set the attribute "setClientCookies" to NO. That
way the CFID and CFTOKEN are stored in the session struct and when the
browser closes there is no persistence.
I should really learn to be more explicit in my short answers.
If setClientCookies is set to YES then put this just below the CFAPPLICATION
tag:
<cfcookie name="CFID" value="#cookie.cfid#">
<cfcookie name="CFTOKEN" value="#cookie.cftoken#">
+-----------------------------------------------+
Bryan Love
Macromedia Certified Professional
Internet Application Developer
Database Analyst
Telecommunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+
"...'If there must be trouble, let it be in my day, that my child may have
peace'..."
- Thomas Paine, The American Crisis
-----Original Message-----
From: Douglas Jordon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 20, 2002 1:33 PM
To: CF-Talk
Subject: Re: deleting session variables when browser is closed
thankee kindly
Shawn Regan wrote:
> <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>
>
> -Shawn Regan
>
> -----Original Message-----
> From: Douglas Jordon [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 20, 2002 1:15 PM
> To: CF-Talk
> Subject: deleting session variables when browser is closed
>
>
> I seem to remember that once upon a time code was posted to delete a
> session variable in Application.cfm when the browser is closed.
>
> Can someone post that code?
>
> Thnx,
>
> Doug Jordon
>
>
>
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists