Ron Savage wrote:
On Mon, 5 Jul 2004 10:26:26 +0300 (IDT), Gabor Szabo wrote:
Now thinking aloud, is it possible that when the browser gets the
page
with the frame it does not send back the same cookie to each
request, both
to the right and the left pane ?


Correct. I was hoping this would be clear from my first post.

I'm running 2 CGI scripts, which are almost identical. But the fact that there are 2 scripts means 2 sessions, and hence the left frame does not know what the right frame is doing.

That is precisely why I ask the original question. How can I let the frames know about each other?

I don't think you are providing us with enough information to accurately answer your question. But I'll try and give some general suggestions that should work regardless of how you implement the sessions.


First off, the point of a session is to identify a single end user on subsequent requests to the server. If your two frames each have their own session, then you are not accomplishing the main goal of using a session. Do the programs actually need two different sessions for each user?

Secondly, how are your sessions implemented (cookies or URL based)? Using a cookie based session with frames can lead to problems, because on the first request to the page, the two frames will be requested in parallel, and hence no sessions will be setup when both requests come into the server. So a session is setup for each frame. To solve this perhaps you need to set the session cookie in the parent frame, which will be loaded first, so that both frames will get the same session cookie and include it in the headers when they make their first request.

If you really do need two sessions for each user (I can't think of a good reason why you would), then you would need to use JavaScript to get the two frames to know about each other. The server knows who it is talking to based on the session, but it can't infer a relationship between two sessions without some help from you (you mention IP address won't work for you which is an obvious candidate). On the client side, JavaScript can be used to talk to the other frame to get some info that can be sent in the next request to the server. But I don't think that is the right solution. The right solution is to use only one session per user...

Cheers,

Cees

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[EMAIL PROTECTED]/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to