Search code examples
javascripthtmlsubdomain

How can I get the cookies from a subdomain?


Let's assume I'm on sub.example.org, how can I get the cookies of .example.org from there? If that's not possible, is there a workaround like an hack or whatever that redirects to .example.org and then stores the cookies?


Solution

  • The cookie was set as HttpOnly flag, and the browser made me not able to get the cookie for JavaScript.