How can I log out after logging in to the website for a period of time, for example, if there is no operation for 30 minutes?
What processing is required on the backend and frontend?
仅有的幸福2017-06-28 09:25:39
Front-end sends request
The backend gets the request, clears the session, and then redirects directly,
Or return the front-end response and let the front-end redirect
The meaning of the question is ambiguous
If the session takes effect during the operation and causes timeout redirection
You can put some tags in the response header, delete them if they are expired, or change them
In this way, when everything involves requests, you can find the effectiveness of the session and redirect the front end
ringa_lee2017-06-28 09:25:39
For the front end, if the login times out, there will be a return value after the timeout. You can operate based on the return value, log out of the login page, close the web page, etc.