W
W
webe2018-01-29 07:15:16
Node.js
webe, 2018-01-29 07:15:16

How long does a session last?

const session = require('express-session');
app.use(session({
  secret: 'qwe',
  resave: false,
  saveUninitialized: true,
  cookie: { secure: false }
}));

Please tell me, let's say I created a Cart property with a basket for the user in the session.
What will happen if the user minimizes the browser and puts the computer to sleep, and then expands the browser window in a week?
How long can a session be stored at most and how to set it up?
The cookie itself says: "When the browser session ends"

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question