Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make two browser windows share the same "session"?

I have an app that needs to open a new window (in the same domain) so the user can view a report, but on some browsers* the new window doesn't share the non-persistent cookie of the original window, which causes the user to have to sign in again. Is there anything I can do to stop the user having to sign in again in the new window?

*In fact, in IE7 it is sporadic - sometimes new windows share cookies, sometimes not.

like image 838
stucampbell Avatar asked Nov 01 '25 12:11

stucampbell


1 Answers

I thought IE7 shared non-persistent cookies with tabs in the same window, as well as windows that were generated from the current window (whether or not this is the same for manual opens like File->New, or programmatic script opens, I'm not sure), but that fresh instances did not.

Firefox shares them across all windows, regardless of how they were opened. I've always assumed that this is just the way it is, and you'd have to use persistent cookies, cookie-less sessions, or develop a single sign-on/ticketing mechanism to work around it.

like image 139
Pseudo Masochist Avatar answered Nov 03 '25 14:11

Pseudo Masochist



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!