I do mean concurrent and not consecutive.
The original use of the code was to whip session variables when the user
closed the browser, so when a new user opened a fresh browser within a
session timeout, the session variables would be cleared (which answers the
earlier question, session variables are common across multiple browser
instances, doh!!).
And the more elegant way is?....
Cheers
Gary
-----Original Message-----
From: Douglas Smith [mailto:[EMAIL PROTECTED]]
Sent: 01 March 2001 19:13
To: Fusebox
Subject: RE: Session VS. Client Vars
Ahhh....you are making sure the permanent cookie that otherwise might get
set by CF Server automatically, is set as a temporary cookie. You know
it's a temporary cookie (resides in browser memory only and is not written
to disk) because there is no EXPIRES option.
If you are really mean running two CONCURANT (open, new window) browser
windows and not CONSECUTIVE sessions (open close open close) , then I must
conclude that memory only cookies are not shared across browser instances,
unlike cookies written to disk! Which is potentially cool, actually. I'll
have to do some testing.
If you mean CONSECUTIVE sessions, then yes of course, that is the expected
behavior. That cookie disappears when the browser closes. So when they
come back, they get a new cookie, with a new CFID/CFTOKEN, and a new set of
variables. However, there are more elegant ways of doing the same
thing. With your method, they get a cookie on EVERY PAGE of the web site.
However, with either of these cases, there still should not be any
difference between client and session variable behavior.
At 11:50 AM 3/1/01, Gary Morin wrote:
>In the test I have been doing I have found both Session variables and
client
>variables in two separate browser instances on the same machine DO NOT
>CLASH.
>
>But in my application.cfm (sorry) I have:
>
><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>
>
>If I remove it then the session and clients variables are common across
both
>browser instances.
>
>Comments and reasons why>
>
>
>
> -----Original Message-----
>From: McCollough, Alan [mailto:[EMAIL PROTECTED]]
>Sent: 01 March 2001 16:17
>To: Fusebox
>Subject: RE: Session VS. Client Vars
>
>I think I know what Gary is runnin' into; its a problem I have and have yet
>to cure...
>
>With db-driven client vars, if a user pops open two browser instances, and
>proceedes to go in separate directions within the same app, things get
>messed up, since the server has no way of identifying the two browser
>instances as being independent.
>
>The problem is, both session and client vars will have the same problem,
>from what I can tell. If you set a session cookie, that cookie isn't
>specific to a browser instance; its' specific to the user logged on the
>client box. So, that cookie is gonna work for all browser instances.
>
>I mean, figure it like this. Somebody logs into my app. After logging in,
>they spawn another browser instance. Prior to ever hitting the server, how
>does the browser make itself look different when it passes that initial
call
>to the server for the first time? It's basically a clone of the initial
>browser instance; and will inherit all the cookies and tokens assigned to
>the original.
>
>Really, from what I can tell, it would have to be a function of the
>-browser- to somehow identify itself as being distinct from the original.
>Perhaps in the way it handles the acceptance/use of cookies? A specific
UUID
>appended to all URLs? I think it has to be the browser that does this,
>though; not the server.
>
>Alan McCollough
>Web Programmer
>Allaire Certified ColdFusion Developer
>Alaska Native Medical Center
>
> > -----Original Message-----
> > From: Douglas Smith [SMTP:[EMAIL PROTECTED]]
> > Sent: Wednesday, February 28, 2001 5:24 PM
> > To: Fusebox
> > Subject: Session VS. Client Vars
> >
> >
> > At 06:37 PM 2/28/01, Gary Morin wrote:
> > >Thanks, I was referring to having the browser running twice.
> > >
> > >My original thoughts were if the user starts up IE browser twice, to
run
> > the
> > >same application twice, that one browser client variables would
overwrite
> > >the other.
> >
> > {redacted}
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists