Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

django 1.8 SESSION_EXPIRE_AT_BROWSER_CLOSE not working

Django 1.7 had a problem with SESSION_EXPIRE_AT_BROWSER_CLOSE = true in Chrome, not expiring when the browser closes. I moved to Django 1.8, I was wondering this problem has been resolved.

like image 904
user2307087 Avatar asked May 07 '15 06:05

user2307087


1 Answers

#19962: The documentation has been updated. Basically, this is not a bug in Django, but rather a special settings in Chrome which allows user to continue its browser session even after closing and re-opening the browser.

See the note in the updated docs.

Some browsers (Chrome, for example) provide settings that allow users to continue browsing sessions after closing and re-opening the browser. In some cases, this can interfere with the SESSION_EXPIRE_AT_BROWSER_CLOSE setting and prevent sessions from expiring on browser close. Please be aware of this while testing Django applications which have the SESSION_EXPIRE_AT_BROWSER_CLOSE setting enabled.

like image 78
Yeo Avatar answered Nov 10 '22 17:11

Yeo