My site and your site should have separate cookies...since the domains are different. Will Tab 1 know not to use a cookie from Tab 2? If they are different sites on different domains/servers, and each site sets cookies of its own, the assumption would be that they should not overlap... Each set of session variable are stored on the respective server...which also makes perfect sense. But let's say two sites use the same session variable name(s) for our own purposes, even if they happen to store different info. The session data on each server should stay isolated (I hope!). Will this cause a problem when one tab tries to use this variable name for another tab..which may change that value in the process? When the next tab tries to use the variable, does it have the new value from the other tab...or the one from it's own server?
Here is what I know from past experiences and can produce this at will. If I have two tabs or windows opened to my site and login...both/all tabs/windows will be the same user. If I log out and change users on one window or tab for the same browser type, all of these will be on the new user as soon as any pages are reloaded. For me, this is fine. And, it is definitely the same variables, which should be overwriting the same file location on the same server. Normally, I can open a few other tabs and windows and use the other sites and my site at the same time. No problem here. I wouldn't mind if it kept the sessions separate, but understand why it would keep them merged as one session.
rulian:
Nope, you are still thinking of the tabs as "seperate sites", when they are not.
Actually, they are different sites. Users are visiting other websites on other servers while my site is opened in another tab, coming back a few minutes later (less than the 20 minute session inactivity max) and the session has appeared to drop them early. Perhaps I got everyone confused...
Here is my concern...and what seems like the problem. If multiple tabs (or windows) of the same browser are all on...and viewing different sites that are not on the same server, can a browser mix up the sessions or the session variable(s) used if they happen to be the same name? Are the variables ever used by the browser. Obviously, they are stored on the respective server(s), but I want to separate "use" from "stored" or "saved". One can read something without necessarily owning it. Is there a limit on the number of different sessions a browser can keep track of?
The reason I ask is because I know there are cookie limitations. Some sites say about 4KB per cookie, and up to 20 or 30 per domain, and up to 300 total for the browser. This was labeled as being "browser dependent" where each can enforce the limits as the browser company sees fit. I also know that my site uses the session cookie and three others for site login status (different components). We also use Google Analytics, which puts up to 5 more cookies in the jar. 9 so far if you are keeping track. 🙂 Firefox uses 2 more at almost every major sub directory that the user visits. I have seen as many as 10 sets of these at the same time, each with a specific path defined.
Maybe I am answering my own question... Right now, I have 12 cookies after visiting 3 or 4 pages of my site. 4 GA + 1 session + 3 for site login + 4 more from Firefox. The only ones that stay are the 3 for the login for later visits. But all the others are for the session. That is more than 10 cookies for just a few pages of one site. If other websites have as many, the total limit will be reached quickly.
What happens to cookies once the browser reaches it's limit? Is it FIFO (first in First Out), FILO, ...? Maybe what is happening is that, as the user opens more sessions on the tabs/windows, older cookies are being removed to make room for newer ones. If one happens to be a session id cookie, that would explain the sudden login drop for that session. If the users opens a new browser window or tab, or logs back in, they are fine...which could correspond to newer cookies saving. Do browsers close sessions to make room for others? 😕