CodeIgniter Forums
How session losts? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: How session losts? (/showthread.php?tid=33039)



How session losts? - El Forum - 08-13-2010

[eluser]Suhas nazir[/eluser]
I am just wandering about session concept ?can any one please explain how session lost when we clear the private data of browser????


How session losts? - El Forum - 08-13-2010

[eluser]WanWizard[/eluser]
A users session is linked to a session_id.

To determine which session belongs to a user, this session_id is sent to the browser using a cookie. At the next request, the cookie is sent back to the server, where CI can extract the session_id from the cookie, and lookup the correct session.

If you erase your local browser data, you also delete the cookie, so CI doesn't recognize you anymore, and will generate a new session for you.


How session losts? - El Forum - 08-13-2010

[eluser]Suhas nazir[/eluser]
Many Many thanks