Hi Rob, In some hostings does not work modifying php.ini
I use this onApplicationInit of the menu
?>
<script>
document.addEventListener("DOMContentLoaded", function(){
// every 5 seconds ;)
const miliseconds= 5 *1000;
setInterval(function(){
// We do not wait for the response of the request because we do not care
fetch("../refresh/refresh.php");
},miliseconds);
});
</script>
<?php
create a blank app called refresh and paste this code
?>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Mi web</title>
</head>
<body>
<p>Here the user can take whatever he wants, his session is not going to
close due to inactivity</p>
<script>
document.addEventListener("DOMContentLoaded", function(){
// We invoke every 5 seconds ;)
const miliseconds= 5 *1000;
setInterval(function(){
// We do not wait for the response of the request because we do not care
fetch("../refrescar/refrescar.php");
},miliseconds);
});
</script>
</body>
</html>
<?php
Hope this can help you. Bye. Willy