It doesn't seem that JS provide any ability off the bat to grab the value of a cookie based on the domain, but does anyone have a suggestion as to how this can be done?
For example: There may be two cookies with the same name, but one is set globally across all pages (.example.com) and the other is set on a certain page (sub.example.com).
document.cookie
will only retrieve a string of all the cookie key:value pairs, with no association to the appropriate domain. ex:
"this_cookie=abc; that_cookie=xyz; this_cookie=123"
I would like to grab the cookie which is instantiated on the subdomain (this_cookie #2)