[Django]-Django no sessionid in cookie

6👍

According to the Django docs, a user has no session until it is necessary:

Django only sends a cookie if it needs to. If you don’t set any session data, it won’t send a session cookie.

You need to set some session data, then you will find the sessionid in the cookie.

1👍

I know that this answer won’t help you, but will definitely help those like I came across your question. If you are using the cookie from javascript, for example as part of an ajax request, you will need to set the following in your settings.py

SESSION_COOKIE_HTTPONLY=False

Leave a comment