title: Javascript: Read out session id from cookie
body: <p>for websockets I have to expose my sessionid from the cookie.</p>
  
  <p>I have searched a bit and found that I should be able to access cookies by:</p>
  
  <pre><code>console.log(document.cookie);
  </code></pre>
  
  <p>unfortunatly this doesn't work or better document.cookie contains an empty string even chrome itself shows me the cookie also authentication works.</p>
  
  <p>Can it be that chrome hides the cookie for javascript?</p>