Skip to Content
Jul 17, 2019 at 04:40 AM

Manage application timeout - logout/reload in UI5


I want to ensure that if user is Idle for more than 30 minutes, then the UI5 application should show a message asking to "Extend" Or "Logout". If extend clicked --> reset timer. My issue is, currently, reset timer is being done in certain scenarios only like --> Odata success calls, loading of some data, etc. But if the user is just on one page, suppose reading the data then after 30 min --> he is logged out, as no calls took place. But in reality the user is online and has not left the application. How to manage this scenario? I thought about mouse events and reset the timer when there is mouse movement or key press, but then that's just going to increase processing for every movement and function calls will be so often to the reset function. What can be the thought process here? Please advise.