As soon as the browser proceses the button click, the request is made to the
server.  If you click another button before the response from the server is
received, then that's a second request to the server.  Chances are good that
the first request's response (what CF generates) will be ignored by the
browser, and only the second request's response will be displayed.  Both
requests are fully processed on the server though.

Targeting (frames, new windows) doesn't affect this in any way.  If you
manage to click twice, you'll get two page requests on the server.  The only
difference is in the way the browser will process the multiple responses,
and that depends on how the frames are nested together.  Again, the server
still processes everything.

Using CFLOCK around the frameset doesn't rectify this, since the frameset
and then each individual frame's page are all loaded as separate requests.
In other words, the CFLOCK has no effect on the frames' pages.  To see why,
think about how the requests have to happen.  Browser requests the frameset,
the server starts generating the page, enters the CFLOCK, generates the
frameset, exists the CFLOCK, finishes the page, and sends the whole thing to
the browser.  The browser renders the page, and realizes it needs to now
request two additional pages (defined by the SRC attributes of the FRAME
tags), and then requests those as well.

The best way to think about framesets is that each frame is it's own browser
window, just that some unknown force happens to keep them perfectly tiled at
all times.  If you think of it that way, then it's obvious each frame is
totally separate from the server's perspective (though not from the
browsers).

Cheers,
barneyb

> -----Original Message-----
> From: Jonathan Gingerich [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 25, 2004 4:01 PM
> To: CF-Talk
> Subject: Page requests, frames, locking, races
>
> Please bear with me!-)
> I have a long question about the basic operation of a broswer
> and a web
> server with frames and CGI's (i.e. ColdFusion).  Suppose I have page A
> with buttons b and c.  The buttons request pages B and C respectively.
> If I click b and c, I observe that sometimes B shows up, sometimes C,
> but never B then C.  I belive, perhaps incorrectly, that I can
> map out any browser session into a single sequence of pages and calls
> (links or forms) that fetched them.  
>
> Now suppose these are CF pages.  Is it possible that even though only
> one of B or C gets fetched for display, that both page requests are
> processed by the CF server and therefore both pages' side-effects may
> happen?
>
> Hopefully that was easy.  Okay suppose I have a frameset A, B, and C.
> Suppose button ac on frame A targets frame C with page AC,
> and button bc
> on frame B also targets frame C with page BC. Suppose I press
> both ac and
> bc. Do both pages AC and BC get processed, or is the
> identical destination
> recognized and lead to the surpression of one or the other?  
> If both get
> processed, then is there any limits on the sequence or is it possible
> the BC would be delayed, not just after AC was displayed, but
> indefinitely
> for a long sequence of other page requests, before showing up out of
> the blue?
>
> Finally, and this is the situation I'm actually comtemplating, suppose
> frame C is actually the parent frame of subframes A and B.  Does
> targeting frame C cause both frames A and B to be targeted as a unit,
> or does that processing take place simultaneously?  I.e. does
> the previous
> example lead to 4 page requests:
>
> AC targeting A
> AC targeting B
> BC targeting A
> BC targeting B
>
> that might execute and be displayed in any order?  (Here I believe I
> can wrap the C frameset in Application CFLOCKs and force the two
> subtargets to process as a unit, but I still have the two requests for
> C to deal with.)
>
> I fear just understanding the question might be asking a
> lot!-) I would
> be very grateful not just for an answer, but just a pointer to a good
> resource on these kinds of questions.
>
> Thanks,
> Jonathan Gingerich
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to