Reputation: 528
I'm trying to set (change) cookie in Chrome Dev tool, but it only stores the name, not the value.
Steps:
localhost:3000
Actual result: the cookie with its name is there, but value is empty.
Funny part - this was working a couple of days ago, can't think of what has changed since then.
OS - MacOS v. 10.14.3 Chrome - v. 73.0.3683.86 (Official Build) (64-bit)
Also I noticed the cookie is highlighted in red color (see MyCookie on the screenshot).
Setting cookie for this page works just fine in Firefox.
Already tried:
127.0.0.1:3000
instead of localhost
Upvotes: 12
Views: 17327
Reputation: 520
opened chrome://flags and set the value of "Partitioned Cookies" to Enabled" and relaunched the browser. After that the red row did not appear and I am able to set the cookies like before.
Upvotes: 9
Reputation: 528
Turned out I have to set an expiration date for MyCookie (all this in DevTools). However, this is confusing because:
Upvotes: 4
Reputation: 941
With the new versin of chrome Max-age of cooke can set in following way using
dev tools -> console set document.cookie manually.
document.cookie='token=1234'.
We will get following things
Cookie Name: token
Cookie Value: 1234
Expires / Max-Age: 2019-12-26T15:22:22.000Z
Upvotes: 8