4 ms·
Having to register staticexample.com instead of using static.example.com feels like there's some fundamental flaw in the browser model. Is there a better fix t
by billpg 17y ago
Having to register staticexample.com instead of using static.example.com feels like there's some fundamental flaw in the browser model.
Is there a better fix that browsers and servers can start with now? Maybe in a year or so time, there will be no need for such kludges.
- psadauskas 17y agoA 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".