But IMO, a better choice if you want a good coverage and want to see if the user pressed refresh in their browser would be to use a PHP session to log if they have visited the page. This should work in 99.9% of cases: