4 ms·
A cookie has a domain field, that applies to subdomains. So, eg, domain=example.com is used for static.example.com, but domain=www.example.com would not be. So
by psadauskas 17y ago
A cookie has a domain field, that applies to subdomains. So, eg, domain=example.com is used for static.example.com, but domain=www.example.com would not be. So the "solution" would be to not use the root domain for dynamic pages.
- prodigal_erik 17y ago"domain=example.com" does not match static.example.com, but "domain=.example.com" does. The problem here is authors who just used wildcards everywhere (so they could skimp on the work to design their URL namespace) and are now regretting that.
- dreyfiz 17y agoI'm testing with Firefox, and if I set a cookie domain to "example.com", I get ".example.com" anyway. If I set a cookie domain to null, Firefox does set it as "example.com" and not ".example.com". Requests for a file from "static.example.com" do not include the cookie from "example.com".