Destroy session or cookie in django when user get offline
Well you can't know if users disconnected their internet or WiFi.
But you can check if user is still online and browsing the website.
to achieve that you can use javascript to send a request every 10 second (less or more) and check if user is still on the site. and if user is not online anymore you can make some changes or etc but in general you can't access to the users device and check the status for wifi or ...
I have a website and i want to destroy some session or cookie in django when user discoonet suddenly or get offline (wifi discoonect or disconnect mobil data).
But i dont know to how do this!
Is there any default library to do this?