Under what circumstances does the session fail?

Such as closing the browser when the time is up, etc.

After the intranet test login, someone else updated the JS, so I have to log in again. Why?

sessionIt is usually cookiecontrolled by setting the validity period, that is to say, if the part cookiesaved sessionIDin it expires, the backend will no longer consider it sessionavailable.

Of course, in the past J2EE, the implementation that comes with the web container was used, and the browser would also fail sessionwhen the browser was closed .session

So in the end it depends on how your backend implementation looks like.

Finally, "other people have updated the JS and I have to log in again", what does this mean? someone else update js? Where to update and how to update?

Did you mean "someone else updated js", did someone submit new jscode and then redeploy the server? If so, then sessionexpiration sounds quite understandable (in this case, it seems that cache services such as redis, etc. are not used)memcached

The session file is stored on the server side, and then the session_id is stored locally in the browser in the form of a cookie. According to the back-end language settings, the expiration time is different.

So there are roughly a few situations

  1. Automatically expire according to the expiration time, and then delete the server-side session file

  2. Manually delete the cookie where the browser stores session_id

  3. Manually delete the session storage file on the server side

  4. Close the browser, the browser has a mechanism to clear the session_id of the session level, the server side actually still exists, and the file will not be deleted until the server side automatically fails.

  5. Language level: the backend language clears the session variable


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325983653&siteId=291194637