Avatar of gianchi66
gianchi66
 asked on

Javascript Code To Log Out User After Webpage Is Inactive

I am looking for a snippet of Javascript code which will log out a user after an authenticated-to page has been idle.

That way you don't have to use cookies. Has anyone ever tested something like that? I imagine it should be something involving a timer and a key-down event.
JavaScriptWeb ApplicationsScripting Languages

Avatar of undefined
Last Comment
Repus024

8/22/2022 - Mon
jrram

So you're looking for a script that will detect the last time a user has pressed a key while they are focused on your web page.  And if after so many minutes there hasn't been any activity, you'd like the page to redirect to another page that has some server side script that will log the user out?

ASKER CERTIFIED SOLUTION
Repus024

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Your help has saved me hundreds of hours of internet surfing.
fblack61