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)
精彩评论