hgolan has asked for the wisdom of the Perl Monks concerning the following question:

there are 2 script

script A:

<HTML> <script> function go(URL){ window.open(URL); } </script> <BODY> <% $Session->Abandon(); %> <BR> <BUTTON onclick=go('b.asp')>BBBB </BODY> </HTML>

script B:

<HTML> <BODY > <% print $Session->{SessionID}; %> </BODY> </HTML>
clicking twice on the button will open two windows that have the same session id can the two windows work at the same time on a different session object?

edited: Tue Feb 25 14:24:48 2003 by jeffa - code tags

Replies are listed 'Best First'.
Re: force to work with new session
by jasonk (Parson) on Feb 25, 2003 at 14:00 UTC

    Yes, in fact since HTTP is stateless, as far as the web server is concerned EVERY page viewed is a new session, that's why you have to use session ids, cookies, or other tricks to keep track of people. The server can't tell and doesn't care how many windows you have open.

      hi lets say i have script A.asp that have 2 buttons, one to B.asp and the other is to C.asp, both B,C print the session id but C.asp have in the code $Session->Abandon(); if i will click both buttons and refresh script C and then refresh script B i will see the id was changed. but if i will open explorer and go to script B, open another one and go to script C even if i will refresh script C(that have session abandon) script B.asp session id is not changing. why now the are working on 2 different sessions? and can i do the same as if i clicked on script A??? thanks!!!