title: document.cookie returning empty string
body: <p>I am trying to get a cookie in my client side javascript by calling 'document.cookie' but it returns ''. I know a cookie exists because I passed 'Set-Cookie' in my response from django's rest framework and the browser's dev tools show that a cookie exists.</p>
  <p><a href="https://i.stack.imgur.com/Xd2pn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Xd2pn.png" alt="dev tools shows cookie 'userID'" /></a></p>
  <p>but again, when running 'document.cookie' in dev tools console window, nothing is returned:</p>
  <p><a href="https://i.stack.imgur.com/LfZ8m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LfZ8m.png" alt="enter image description here" /></a></p>
  <p>The cookie doesn't have 'HttpOnly' flag set. I'm not sure how else to get existing cookies using javascript.</p>