title: Django Cookie Detection Fails Though Cookie Hasn't Expired
body: <p>I have a cookie on the client browser to store a hash value. I've extended the cookie lifetime  using this</p>
  
  <pre><code>response.set_cookie('kmliCookie', randomHash, settings.COOKIE_LIFETIME)
  </code></pre>
  
  <p>and firefox shows that this cookie expired next month. </p>
  
  <p>When I refresh the page, django detects the cookie even if I close the browser and come back the cookie is detected but after a system restart (may be due to IP change) the cookie is not detected. </p>
  
  <p>Its not even there in the request object. But firefox still has the cookie and it's not expired. </p>
  
  <p>I use this code to detect the cookie</p>
  
  <pre><code>if request.COOKIES.get('kmliCookie'):
      message = "valid"
  else:
      message = "invalid"
  </code></pre>
  
  <p>it results in invalid (only after system restart or ip change). </p>
  
  <p>I used this to check the request object.</p>
  
  <pre><code>  render(request, 'index.html', {'request':request.COOKIE})
  </code></pre>
  
  <p>and request object didn't have kmliCookie.</p>
  
  <p>What am i doing wrong here?</p>