You could theoretically do it by saving the system time to a cookie, then running a setInterval() to check if 10 minutes has passed from the cookie.
It should also be noted, however, along with pravinasar's wise admonition, that Javascript is not a very good choice for site security. What exactly does it mean to "log out" of your site? Are you just going to redirect them somewhere else? If so, someone could "hack" your site by just clearing their cookies, at least if you use my example.
Main Topics
Browse All Topics





by: pravinasarPosted on 2005-10-03 at 08:04:12ID: 15006983
Session Time out kind of work is best handled by server-side session manager. What is your server environment.