Skip to content Skip to sidebar Skip to footer

Javascript Duplicate Cookies

I'm using the Hapi framework for a Node.js application, and the Hapi framework comes with its own Cookie management tools, which i'm using for authentication. The framework then se

Solution 1:

Is by some chance the original cookie already present in this?

btoa(JSON.stringify(_decoded))

Cause from: document.cookie

document.cookie is defined as:

a string containing a semicolon-separated list of all cookies

So it seems to me you are adding a new semicolon-separated value (new cookie) to that list (without removing the original cookie)

Ok, it's not that, have you tried this?

link

Sounds like the same problem you described

Solution 2:

For anyone with a similar issue, this was eventually solved by dropping the domain property altogether. See other related question

Post a Comment for "Javascript Duplicate Cookies"