slimjim wrote:When i set a cookie var to "", but also have another browser window open, it seems that the cookie name is staying or something..
if the var is empty, it is suppose to redirect me..
I know when I close all browsers windows, then I am fine..
Is there a way to fix the issue ?
Here's how I think it works:
Cookies are uniquely created per machine, per user account, per browser process, per domain path. The last two are represented in-memory while the browser is open. When you close your browser, the cookie is persisted to disk.
So if a user walks up to my machine, he would login under a user account. He would launch Internet Explorer and specify a domain path. Internally, the cookie data is in-memory for that "unique signature". If your logged in as the administrator and look at the Documents And Settings folder, underneath it are all the user accounts in the system. Each user has his own cookie folder. The name of each cookie file is prefaced with the name of the user, followed by the @ sign, followed by the domain, and ended with a .TXT extension.
If the user launches the browser by clicking on the desktop icon or on the start menu, a process is created. Each process has its own in-memory cookie. If the user chooses New Window... (or tab under Firefox), another thread is created which is owned by that browser process. Under this scenario, these threads share their cookies with their parent browser.
As a user continues to surf, the in-memory cookie is modified. As long as the cookie hasn't expired, then when the user closes the browser, that's when the cookie is persisted to disk.
Now let's say the user goes to a URL with browser process #1. He then launches another browser process to the same URL. At this point two separate sessions and cookies exist in-memory. If browser process #1 invoked a HTTP resource (page) that cleared a cookie setting, the other browser #2's cookie wouldn't know about it.