I have a scheduling page where every 30 seconds I send (in the background) an ajax request to know which schedules are still available, if there is an error I show a bootstrap with error information, it works 99% / p>
The 1% is because the following happens, if the user stays a long time without interacting with the system, it disconnects and shows the login page inside the popup and this ends up being inconvenient because it unconfigures the system.
Well, I'm doing a redirection routine if the session is expired for the user to log in again, but it does not seem to me to be ideal.
The question is: Should I make a request every 30 seconds with ajax, PHP should not keep the session active?
I'm using friendly URLs where every page request is passed through the index.php file and I have all the default system settings.
The system is running round except for this fact of automatic disconnection and session loss.
I have already tried and tested the web on this behavior of php, but it was not clear how to solve.
As the system is complex because it involves several other things on the same page, putting code here will be a bit complicated, I hope the post gives an idea of my problem.