Can a subdomain delete a domain cookie?

Suppose I have a cookie set for .domain.com and my subdomain is sub.domain.com. Can I delete cookies set for the primary domain? I know that they can be read, but can I delete these cookies or overwrite their values?

+8
cookies
source share
1 answer

Yes, the subdomain can set / release a cookie for the main domain, but the main domain cannot set / release a cookie for the subdomain. See RFC 6265 Sections 5.1.3 , 5.3 (see clause 6) and 8.6 . Section 8.6 specifically describes how a subdomain can set a cookie for the primary domain and affect the subobject of the child node.

+8
source share

All Articles