p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

proasp_codeclinic thread: How to seperate windows that share the same cookies/sessions

Message #1 by "Frank van der Burg" <burg@g...> on Tue, 29 Aug 2000 8:33:42
You could write your application so that progression through certain parts
of the application cause session variables to be set which prohibit the
repetition of these pages.

After page1.asp is submitted to page2.asp a session variable to set.
On page2.asp this variable is checked for. If the variable is already set,
an error page is loaded. If the variable is not set, then it is set.

Thus, if does not matter how many windows I have open, I will only be able
to submit page1.asp once in the session. If I use another window to submit
page1.asp I will get the error page loaded.
This is because the session variables are held on the server, not the
client. The client only holds a cookie with the session ID. Each window
should be using the same cookie.


----- Original Message -----
From: "Frank van der Burg" <burg@g...>
To: "Code Clinic" <proasp_codeclinic@p...>
Sent: Tuesday, August 29, 2000 8:33 AM
Subject: [proasp_codeclinic] How to seperate windows that share the same

> Alex Homer has written an article in 1999 about to seperate 'page1.asp'
> from 'page2.asp' with the use of session variables that have the name of
> the page as the session variable.
> However if you open up a new window (Ctrl + N) a different problem occurs:
> Both windows have the same name so the session variable in Alex homer's
> approach also have the same name. Due to the nature of dynamic pages
> however both windows don't have to contain the same content. So one page
> session variable is able to overwrite the session variables of the other
> page.
> Does anyone ever encountered a solution for this problem or are there
> suggestions how to solve this problem?
> Thanks in advance,
> Frank van der Burg

  Return to Index