posted 12 years ago
I came across this in my search for an answer to the same question. What i think is...
Create a javascript variable that will hold the session timeout value (sent from the server)Create a javascript interval that decrements this value (say, every second?) e.g.
Every time the page reloads, or an xhr request returns, reset the sessionLife variable to SESSION_TIMEOUTWhenever the sessionLife variable gets to zero, alert the user with javascript that his session is expired; then he clicks a button that takes him back to the login page.