0

We have cookies added by the current website say www.example.com. Cookie domain of those cookies is one of the following when viewed in browser,

  • www.example.com (are also marked as HostOnly)
  • .example.com
  • .www.example.com

Now, we are creating a sub-domain say test.example.com and we need that sub-domain to have access to all the cookies added by www.example.com.

Please help in understanding which of the cookies will NOT be shared and why.

Also, another query regarding cookies is - HttpOnly. Will cookies marked as HttpOnly be not available across sub-domains?

deejo
  • 271
  • 1
  • 5
  • 12
  • 2
    duplicate: [Share cookie between subdomain and domain](http://stackoverflow.com/questions/18492576/share-cookie-between-subdomain-and-domain). The `HttpOnly` attribute is an instruction to the web-browser to not allow javascript to access it. – Ryan Vincent Aug 16 '16 at 16:43
  • Thanks Ryan! Can you also please brief me on HostOnly cookies? Can they be shared across subdomains? – deejo Aug 17 '16 at 08:31
  • 2
    Possible duplicate of [Share cookie between subdomain and domain](https://stackoverflow.com/questions/18492576/share-cookie-between-subdomain-and-domain) – Viktor Nov 16 '17 at 17:52

0 Answers0