Playback is carried out on the basis of the โstatelessnessโ principle by nature, therefore it is not monitored and not monitored on the server. When you use the session API, you simply create a cookie that will be sent with each request / response from / in the browser.
This cookie does not have a timeout or expiration date, so it will remain until the browser is open. However, you can implement your own session timeout mechanism by setting the last access time in the session cookie and compare it with the desired timeout for each request.
source share