Is there any way to check by javaScript whether a session is timeout? If it is possible in javascript, can any one help me with the code snippet?
See Question&Answers more detail:osIs there any way to check by javaScript whether a session is timeout? If it is possible in javascript, can any one help me with the code snippet?
See Question&Answers more detail:osif you mean a server session, then no - it can't be done properly.
You could initialise a timer to the same value as the server session - if the timer executes then the user has been on the same page long enough for the server session to expire, but that doesn't actually check if the session is expired, it merely tries to guess.
Alternatively, you could do an asynchronous call to a URL on the server, but on most servers this will automatically extend the session - if the call succeeds, then the session is active...