It's possible to have two cookies with the same name but different values in document.cookie if a subdomain and a domain set the same cookie.
For example, if I:
- Visit
subdomain.domain.comfirst, which sets amy_cookie=foocookie. - And then visit
domain.comsecond, which sets amy_cookie=boocookie.
document.cookie in Chrome 81 will show my_cookie=foo; my_cookie=boo on subdomain.domain.com, in the order in which the cookies were set with the most recent cookie last.
My question is, can this ordering be relied on (and is there a rfc that talks about this)?
