Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Are you trying to access the cookie in code executed Clientside or Serverside? If it's clientside, the first time it sees the cookie is in the response. If it's serverside, look at the headers you're about to/have submitted to the client as you set it, or look at the received headers in requests from the client which arrive after it has been set. Commented Feb 4, 2015 at 17:20
  • Thanks for the comment. Edited the question, specified the server side is in question. The thing is when I check headers to be sent to the client in the node route handler with res.getHeader('set-cookie') it returns undefined. That's why I wonder if there is some special trick to do it. Commented Feb 4, 2015 at 17:23
  • Could you post the code where you set the cookie, and where you're checking the cookie. Commented Feb 4, 2015 at 17:45