CodeIgniter Forums
Share same session in multiple browsers - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Share same session in multiple browsers (/showthread.php?tid=37527)



Share same session in multiple browsers - El Forum - 01-12-2011

[eluser]Unknown[/eluser]
Hello! I wonder how the session to work on multiple browsers. If the user login in Firefox, and then within the session time access Internet Explorer, keep logged on.

Is this possible?

Thanks a lot!


Share same session in multiple browsers - El Forum - 01-12-2011

[eluser]WanWizard[/eluser]
It is not possible to reuse the same session. Sessions are linked to an encrypted random session ID, that is stored in a cookie. Cookies are browser specific.

You could code your app so that information that needs to be shared isn't stored in the session record, but in the user record, and make some kind of remember me function that automatically logs the user in. You can store that in a separate cookie with it's own expiration.


Share same session in multiple browsers - El Forum - 01-13-2011

[eluser]Unknown[/eluser]
OK, Thanks a lot!