What to do with a timed out user trying to use ajax functionality?

dibrorruggire

New Member
Here is the scenario,[*]User Logs In[*]User gets up, goes to get some coffee, and talks to co-worker Steve in the kitchen for 15 mins[*]Users session times out[*]User comes back to desk and trys to use a field on his/her screen which utilizes ajax functionalityNow, In the ajax page I am checking to see if he/she is logged in, but what do I do with the user? If I just return nothing from the ajax page, then the user does not know why the field is not working. If I try to use header("Location: "), that will not work as expected. I could return a message saying you need to refresh the page, but that is kind of lame. What I would like to do is return the user back to the main page. I could do this using javascript obviously, but that is relying on the fact that user did not just go to http://website/ajaxpage.ajax.php and has javascript disabled. So what is the best way to handle this?UPDATEWhat about automatically refreshing the page after 15 minutes passes? Maybe using a meta tag? Or a javascript timeout on the page? That would cause the user to just see the login screen automatically when they sit down, however if they are on the same page for 15 minutes it may refresh and be annoying.
 
Back
Top