Try document.cookie = 'a=b' in a browser console on non-www domain and then do document.cookie on the www variant.
You'll see it not set. (The cookie will only be accessible on subdomains if you include the domain explicitly, like document.cookie = 'a=b;domain=toplevel.domain')
Yeah, because the WHATWG folks changed the spec after 20 years. Not because IE implemented the wrong thing. Not surprising folks in this thread remember the old spec, which was valid for longer.
Try document.cookie = 'a=b' in a browser console on non-www domain and then do document.cookie on the www variant.
You'll see it not set. (The cookie will only be accessible on subdomains if you include the domain explicitly, like document.cookie = 'a=b;domain=toplevel.domain')