开发者

can't see some cookies using javascript

开发者 https://www.devze.com 2023-02-22 01:20 出处:网络
I\'m trying to access cookies using clie开发者_运维百科nt-side javascript. On the server I\'m using node.js and cookies module. I set two cookies, \"UUID\" and \"nick\".

I'm trying to access cookies using clie开发者_运维百科nt-side javascript.

On the server I'm using node.js and cookies module. I set two cookies, "UUID" and "nick".

I can read these back correctly on the server, and I can also see that they are set by looking at the stored cookies in browser prefs (I've tried with Chrome and Firefox).

However, when I try to access them on the client, I can only seem to access "UUID", not "nick". I've tried various JS cookie reading function, and also just dumping document.cookie - everything seems to indicate that the "nick" cookie is not present.

Can anyone help?


Check out if the 7th parameter of the cookie is not set to TRUE(if he is, a serverside cookie is not readable via javascript)

0

精彩评论

暂无评论...
验证码 换一张
取 消