lundi 25 février 2019

Why does same cookie key set by two tabs are not overwritten?

So please ignore underlying details of why I am doing it. Open Tab 1 then Tab 2 both making ajax request every 5 seconds.

Tab 1: domain.com/a.jsp : Set-Cookie: sec-token=12345; max-age=28800; Secure; HttpOnly
Tab 2: domain.com/b.jsp : Set-Cookie: sec-token=ABCD; max-age=28800; Secure; HttpOnly

Shouldn't Tab 2 have overwritten cookie value set by Tab 1 ? I assume yes but I see that both tab 1 and tab 2 keep sending their related cookies that were set by their respective urls.

I have checked this in chrome and FF. Looking at chrome Settings > Cookies, I see both cookies are listed for sec-token with their own related path and values.




Aucun commentaire:

Enregistrer un commentaire