Why sessionid is empty string return response Set-Cookie on django?
<p>There is question for me , why django sessionid is empty value, return set-cookie</p>

<p>however sessionid value is empty but set Set-Cookie,</p>

<p>request on cookie :</p>

<pre><code>Cookie: sessionid=;csrftoken=BF8nOVWsMJaX9Gi3aJijGSO97iTyLpNY
</code></pre>

<p>here sessionid is empty now response this request from django:</p>

<pre><code>HTTP/1.1 200 OK
Date: Sun, 09 Oct 2016 08:17:15 GMT
Content-Type: application/json
Connection: keep-alive
Set-Cookie: sessionid=; expires=Thu, 01-Jan-1970 00:00:00 GMT; Max-Age=0; Path=/
Content-Length: 18
</code></pre>

<p>why any check sessionid is empty or no from django? and response like without Set-Cookie:</p>

<pre><code>HTTP/1.1 200 OK
Date: Sun, 09 Oct 2016 08:17:15 GMT
Content-Type: application/json
Connection: keep-alive
Content-Length: 18
</code></pre>

<p>Try to login to you django project and then check the <code>sessionid</code> value. You will see the cookie's value there. If Django does need to keep some data in the cookie, it will not. </p>

python django cookies