On Fri, Dec 10, 2010 at 1:27 PM, Stodge <sto...@gmail.com> wrote:
> I have SESSION_EXPIRE_AT_BROWSER_CLOSE set to True in my settings.
> When the user visits my custom login page a new session is created for
> them in the database. The expiry time is set to two weeks.
>
> If I then close the browser, the expiry hour/minute are adjusted but
> it's still set to two weeks in the future. Shouldn't the expiry date
> be set to the current date?
>
> If I re-open the browser, login and then close the browser, the
> session expiry time is still set to two weeks. Shouldn't the expiry
> date be set to the current date? The session is expired because I have
> to re-login when I visit the site again.
>
> Thanks
>

SESSION_EXPIRE_AT_BROWSER_CLOSE denotes whether the session cookie is
set as a session cookie (browser removes the cookie when it closes) or
whether it is a permanent cookie (with lifetime equal to the expiry
date set in the model).

It does not affect anything to do with stored sessions, so the session
expiry date does not change in the DB, your browser just loses the
session id when it is closed, and so when it is re-opened it can no
longer access the (still valid, and not expired) session.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to