S
S
sdfasgsgda2022-04-14 11:32:18
JavaScript
sdfasgsgda, 2022-04-14 11:32:18

How long does a Google session last?

Hello, I don't quite understand how cookies work. Some live up to 23-24 years. Session as I understand it for + -12 hours. But at the same time, if I come in a week, I will be authorized. Can you explain a little how they work or recommend some articles on this topic. Thank you for your attention.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Ne7Le4Der, 2022-04-14
@sdfasgsgda

We can set the lifetime of cookies either through the Expires attribute, specifying a specific date and time, or through the Max-age attribute, specifying the lifetime in seconds since the cookie was set. A session cookie, as the name implies, lives for the duration of the session - as soon as you close the client (in the case of the web, the browser), the cookie will be deleted.
More details: https://developer.mozilla.org/ru/docs/Web/HTTP/Cookies
UPD:

However, if automatic session recovery is enabled in the browser, which happens very often, the session cookie can be stored permanently, as if the browser had never been closed.

Again, from the link that I threw off, I think there are answers to all questions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question