I'm trying to determine scenarios in which a cookie returned by HTTP server overwrites an existing cookie vs. sets a new cookie.
Say foo.example.com sets a cookie:
Set-Cookie: SSID=abc; Domain=.example.com; Path=/abc; Expires=Wed, 13-Jan-2021 22:23:01 GMT; Secure; HttpOnly
Which attributes bar.example.com needs to set in order to overwrite this cookie and not create a new one? In particular, will following response header overwrite the original cookie:
Set-Cookie: SSID=xyz; Domain=.example.com; Expires=Wed, 13-Jan-1990 22:23:01 GMT;
Is the behavior consistent across browsers?