I have a meta refresh that redirects to a page when the application times out.
<meta http-equiv="refresh" content="1200;url=/SessionExpired.aspx">
But when a user is interacting with that page, the redirect will obviously fire regardless of whether the user has been working interactively via AJAX postbacks.
How can I reset the meta refresh countdown whenever the user is perceived to be continuing an interaction with the page? (via an AJAX postback, for example).
I’m working with ASP.NET Web Forms using UpdatePanel to AJAXify my page.
Thanks,
Richard
A more user friendly method (imho) is to use a javascript timer on the page. When the timer is up tell the user they have timed out.
Meanwhile, upon every ajax request reset the timer.
See the code to hook into the ajax call here:
Intercept ajax requests with jquery to display BlockUI