Hi team,
we are using angular JS and .net core API for our app development but now I need to identify in-active or idle timeout of the application.
Is there any way to track this ?
Thanks
Madan S B
Hi team,
we are using angular JS and .net core API for our app development but now I need to identify in-active or idle timeout of the application.
Is there any way to track this ?
Thanks
Madan S B
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Rajkiran SwainRank #165 · 14.4K reputationPosted Mar 29, 2023, 4:08 PM EDT
var inactivityTime = function () {
var idleTime = 0;
var idleInterval = setInterval(timerIncrement, 60000); // 1 minute
function timerIncrement() {
idleTime++;
if (idleTime > 29) { // 30 minutes
clearInterval(idleInterval);
// Call your logout function here
}
}
// Bind events to reset idle time on user activity
angular.element(document).on('keydown click mousemove', function () {
idleTime = 0;
});
};