0

I am making a project in Django to practice authentication. I am using sessions and have enabled

SESSION_EXPIRE_AT_BROWSER_CLOSE

But still the session remains if I close the browser tab. It works when I quit the browser, but I wanted it expire after tab is closed. I am unable to find a solution.

Thanks in advance

  • You can use jQuery to delete your session on tab close, check out reference [here](https://stackoverflow.com/a/9158131/1305461). As [this](https://stackoverflow.com/a/3980634/1305461) answer states: "Closing the tab or window does not count as closing the browser. Make sure you quit the browser program to end a browser session." – felipe Oct 16 '20 at 07:34

1 Answers1

0

Please explain the error more in details !

In backends.py you will get SESSION_CATCH and SESSION_KEY but django by default save it, u don't have to worry jut clear the migrations and again makemigrations all the tables.

sanastasiadis
  • 1,182
  • 1
  • 15
  • 23
Saikat Mukherjee
  • 500
  • 5
  • 11