Add background ajax query in an attempt to prevent session timeout

This commit is contained in:
Marcus Hill
2023-10-21 12:34:34 +01:00
parent ba9442e6c3
commit 65168fe702
3 changed files with 27 additions and 0 deletions

8
keepalive.php Normal file
View File

@@ -0,0 +1,8 @@
<?php
// Keep PHP sessions alive
// Receives requests via AJAX in the background every 10 mins to prevent PHP garbage collection ending sessions
// See footer.php & js/keepalive.js
session_start();
session_write_close();