Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to deal with session timeout in web apps?

I am currently building an internal web application used in a factory/warehouse type location. The users will be sharing a single PC between several people, so we need to have a fairly short session timeout to stop people wandering off and leaving the application logged in where someone else can come to the PC and do something under the previous user's username.

The problem with this is a session can timeout while a user is currently entering information into a form, especially if they take a long time.

How would you deal with this in a user friendly manner?

like image 594
anon Avatar asked Sep 22 '08 11:09

anon


People also ask

How do I increase session timeout in web application?

– You can manually specified the timeout value in “second” for a particular session. HttpSession session = request. getSession(); session. setMaxInactiveInterval(20*60);

How do I stop session timeout?

To prevent a session timeout, you must interact with the workbook. This might include navigation around the workbook, sorting, filtering, or any other activity that you do with the elements of the workbook. When the server detects user interaction with the workbook, it keeps the session active.

Why session timeout is important in Web applications?

The Session timeout defines an action window time for a user, this window represents the time in which an attacker can try to steal and use a existing user session… For this, it's best practices to : Set session timeout to the minimal value possible depending on the context of the application.

How do you maintain a session in a web application?

Since HTTP and Web Server both are stateless, the only way to maintain a session is when some unique information about the session (session id) is passed between server and client in every request and response. There are several ways through which we can provide unique identifier in request and response.


1 Answers

Keep the server informed about the fact that the user is actively entering information. For instance send a message to the server if the user presses the TAB key or clicks with a mouse on a field. The final solution is up to you.

like image 95
Drejc Avatar answered Oct 22 '22 14:10

Drejc