can't see some cookies using javascript

2.3k views Asked by At

I'm trying to access cookies using client-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?

1

There are 1 answers

4
Dr.Molle On BEST ANSWER

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)