node.js - Browser page refresh gets a new session cookie/id -


i having issue in application. whenever browser refreshes reassign cookie new content , new session id. right behavior of browser?

the application uses express , connect-tedious libraries of nodejs. user gets logged out because cookie content , session id different whenever refresh. suggestion on how go resolving problem?

if node server code responsible setting cookies user , session (using set-cookie header or generating javascript file client same), should check existing cookies in request. when page reloaded, request come server again. @ point can read cookies passed server (which include cookie session , user set last time). if these cookies found , valid, server should not generate new cookie same.

even if logic not reside on server , part of client side js, overall idea same. not create new cookies, if can read existing ones correctly.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -