Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Session cookie not expiring When Chrome Browser is closed on smart phones

I have an application that sets a session cookie during the begin request of an application. The expectation is that this clears out when the browser is closed and it is working as designed for most scenarios except when browsing using Chrome on Android device or an iPhone.

Looks like a Smartphone version of Chrome doesn't clear off session cookies...

Did anyone encounter this issue?

like image 273
Kiran Vedula Avatar asked May 21 '15 19:05

Kiran Vedula


People also ask

How do I set cookies to expire when browser is closed?

You can set a cookie to expire at the end of the browser session by setting the HttpCookie. Expires property to DateTime. MinDate , or not setting the property at all.

Are session cookies deleted when the browser is closed?

They manage the lifecycle of theses IDs, and once they expire the ID on their end, your cookie is meaningless. But usually session cookies are assumed to be deleted by the browser when the browser is closed, so the length of a "session" is supposed to be one sitting.

How long does a session cookie last in Chrome?

Yes the Session cookie expires. In addition to the 30 minute default timeout (if the visitor is idle for 30 minutes) the 'Session ID' cookie will expire at the end of an internet browser session.

Does session cookie expire?

Session cookies expire once you log off or close the browser. They are only stored temporarily and are destroyed after leaving the page.


1 Answers

Chrome on the desktop has the same problem. It doesn't kill session cookies because it keeps a process running in the background. Assume it's the same 'feature'

like image 153
Josh Avatar answered Oct 04 '22 02:10

Josh