Search code examples
node.jsexpresscookiescookie-session

server sent cookie is not overriding the existing cookie


i have a express application and using cookie-session module for session management. application has 2 paths https://example.com/abc/def and https://example.com/abc/ghi . if i am visiting any path first then it sets a cookie but if i am changing the URL to other path then i can see that server is responding with new value for the cookie in developer console but it is not getting updated in browser. any idea what is preventing cookie from getting updated?


Solution

  • on further analysis i found the the content length for the cookie is going beyond the allowed size of 4096 bytes, once we fixed the content we are seeing cookie properly getting set.