How to check if the Session expires using JavaScript
问题 I want to redirect the user to the "Login page" from anywhere in the application once the session is expired. How can I accomplish that using JavaScript? 回答1: A typical implementation of a session requires two things: A cookie in the browser A server side record of the session associated with the number stored in the cookie These cookies are usually set up as session cookies. They expire when the browser closes. Thus you don't need to worry about testing them to achieve this. To find out if