Docs: Logout on closing browser window?

http://www.yiiframew…ide/topics.auth

Quote

By default, a user will be logged out once he closes his browser window.

That’s news for me :). Shouldn’t it be “…once his session expires.”?

That's the meaning. By default, a session will terminate if the browser is closed.

Hmm. Sorry, but I have to be picky here ;D : Mostly session id is stored in cookies and they persist no matter wether the browser gets closed, so the session does not terminate when the browser is closed.

Could be confusing for some people…

Thank you! Yes, the session actually remains there till expiration, although closing the browser will expire the session cookie by default.

Strange, i've never experienced that - at least not with Firefox. My sessions are never terminated when i close my browser. Is this different in IE?

Yes, I observed the similar thing with FF. Different on IE though.

Ah, ok. I just verified my settings. In FF preferences it says, the cookie should be kept until it expires. And the cookie lifetime is specified as "until the end of current session" (translated from german).

So now i wonder, why Firefox "misbehaves". Sessions don't expire, even if they should according to the preferences.

Anyway, thanks for pointing that out. Wasn't aware of that.

Hi guys,

maybe late on the subject, but I wish to know how to log the user out after the browser is closed and I don’t seem to find any clue on the google. Have you any solution to this?

Thank you so much