Question

Generally sessions in web applications expire after a stipulated max inactive interval. To my knowledge primarily the reason is if the session objects are not invalidated they keep exhausting the memory. So my question is

  1. Is there any other reason other why web applications timeout the user session after an inactive interval?

  2. Social sites never timeout the user session even if you just leave them for the entire day. How do they manage sessions? Don't the active sessions exhaust memory on their servers?

Was it helpful?

Solution

  1. : You may want to protect your application or the users profile, if he's inactive for a particular time he may be not in front of his computer anymore. So persons that may not be allowed to access the application or this profile gain access.

  2. : They may use the normal php session handling, set the cookie to expire in a year and save the server side session data in their database. When you logout your cookie gets deleted aswell as your data on the server.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top