Currently, I have:
header('Refresh: 300;url="http://www.ohjustthatguy.com/uploads/"');
$_SESSION['refresh'] = 'true';
This is a timer to redirect the browser after 5 minutes of inactivity, and sets the $_SESSION variable to true, so that the /uploads/index.html page picks it up and displays some extra text. The problem is is that if you hit the back button without any page expiration, the $_SESSION variable still gets set, and therefore the text still gets displayed.
Any thoughts on a better way to do this?
Is Javascript an option for you? If it is, it might be a better way to handle the timeout (and you could do more sophisticated ‘inactivity’ tracking if you wanted).
Alternatively, you could add it as a GET parameter:
header('Refresh: 300;url="http://www.ohjustthatguy.com/uploads/?refresh=true"');