Possible Duplicate:
Automatically re-direct a user when session Times out or goes idle…
I have a Log In system and the session expires, but they need to refresh the page to be shown the login in screen again. Instead, my users enter data and hit submit to find out that they have been logged out.
Is there any way to make the page automatically redirect to the log-in page once the session has expired?
Thanks!
EDIT:::
From reviewing the previously asked question found Here I have used the accepted answer for this application. Thank you all for your suggestions.
Well, optimally the data the user sent using your form is saved temporarily, the user gets a chance to log in again and then gets redirected to the page he came from, already filled with the old data. Having to type data twice (or having the page itself redirecting after some amount of time if you’re in the middle of something) is rather annoying.
If you want to redirect without retaining the entered data on the page you should at least show the user an indication how much time he has left until the page expires. Using JavaScript should be a good option for that.