If a user is idle for a certain amount of time, it is often a good idea to set up an automatic session timeout with Ajax to force a logout, especially if there might be sensitive data on the screen. This is normally handled on the server side; however, if we want to hide the data on the screen and alert the user that the session has ended, we’ll need to handle the session on the client as well. One way to handle this is described below:

Leave a Reply

Your email address will not be published. Required fields are marked *