According to the connect documentation , the session should expire when the browser is closed:
By default, cookie.maxAge is null , which means that the "expires" parameter is not set, so the cookie becomes a browser cookie. When the user closes the browser cookie (and the session) will be deleted.
I use express 3 with connect-mysql for session storage (I tried the same one with connect-mongo too) and this is how I set up the session data.
req.session.userid = results[0].id; req.session.ip = req.connection.remoteAddress; req.session.useragent = req.headers['user-agent']; req.session.is_logged_in = true;
Everything works fine, except for the Chrome browser browser for any reason (this is not possible in OS X Lion.I now for testing under win or linux).
Has anyone had this problem in google chrome and know how to fix it?
source share