Reputation: 127
There is a similar question but it has not answered the how client and express sessions are different to each other.
I believe client sessions store cookies on client side browsers and express session stores cookies in database like mongo stores.
Upvotes: 4
Views: 2447
Reputation: 1
The cookie-session middleware takes the cookie data and assigns it to the session property (all the necessary data is in the cookie), whereas express-session middleware stores a reference to a session inside the cookie, which often points to some remote data store outside your application.
Upvotes: 0
Reputation: 1674
Basically, express-session
is more abstract, it supports different session stores (like files, DB, cache and whatnot).
And client-session
is a simple / lightweight cookie-based (cookie is the only storage engine supported: all the session info is stored on the client, in a cookie) session implementation.
Upvotes: 5