For the business-logic reason, I need to set a sessionid
cookie for the each site visitor, even if there are no actual data stored for this session.
It can be possible by setting SESSION_SAVE_EVERY_REQUEST
to True
and by overriding https://github.com/django/django/blob/fc4b4fd5850989458d6e54de12a29b2e40e94ce8/django/contrib/sessions/backends/base.py#L153 to always return False
.
But in that case, the session cookie will be not deleted because of https://github.com/django/django/blob/fc4b4fd5850989458d6e54de12a29b2e40e94ce8/django/contrib/sessions/middleware.py#L37.
Can there be problems if cookie will remain?
Or maybe there is another way to set sessionid for every visitor?