title: Firefox extension: how to read a cookie name and value on the current page
body: <p>My extension works on an application, which requires user login. Once the user has logged in, I need to read the cookies and use them in my <a href="http://en.wikipedia.org/wiki/XMLHttpRequest" rel="nofollow noreferrer">XMLHttpRequest</a>s. 
  So initially I need to check if the cookie is set, if not, I direct the user to the login page. Once logged in, I need to read the cookies and send it as part of my further requests.</p>
  
  <p>How do I read cookies from a XMLHttpRequest or otherwise (if we don't even know the name of the cookie)</p>
  
  <p>There is to function as getRequestHeader.. but what I need is something like that.</p>