Hi,
I am building a website using PHP. By default the SESSION is kept active for 24(1440 seconds) minutes of inactivity.
What i want is to refresh the SESSION as soon as the user interacts with the website (movement of the mouse, click on links inside the website, etc.)
The way i am trying to refresh the session is by calling PHP script named refreshSession.php with AJAX as follow:
$.ajax({
cache: false,
type: "GET",
url: "refreshSession.php"
});
and the PHP script goes as follow:
refreshSession.php
<?php
session_start();
echo 'test';
?>
But the session does not refresh.
The only way to refresh the session is to reload the page.
What am i doing wrong? Any suggestions?
Regards,
Christos