My question is a bit complex:
Today I use a simple redirect just using HTML:
<meta HTTP-EQUIV='Refresh' CONTENT='480;URL=./logout.php?type=2'>
Where "CONTENT" is the regressive time (in seconds) it will count before redirecting. But I use this code as an auto-logout. Since 480 seconds is 8 minutes, after 8 minutes without a page change or update the system will automatically "unplug". However, I had to add a new feature in the system, where it is now normal to exceed this time.
What I really need is something (whether in JavaScript / ajax / PHP / html / Jquery) that kills the time if the user is moving the mouse or keyboard (ie interacting with the page) so that the system does not close in the middle of the job.
In my head this is a seven-headed animal, if anyone can help me ... I thank you very much!