I am trying to check if the page was refreshed or no using PHP and on all the browsers.
This is what I tried to do:
if( isset($_SERVER['HTTP_CACHE_CONTROL']) && $_SERVER['HTTP_CACHE_CONTROL'] === 'max-age=0' ) {
// page was refreshed
}
However it doesn't work on Google Chrome.
I've also tried to set a SESSION - but how can I destroy this session so users can still visit the page but not refresh it?
I've also tried other several answers from PHP: Detect Page Refresh
Any help would be appreciated.
Thanks!