Is there a way to determine if someone has updated the current page using PHP, and not arrived from another place.
I only have access to the code for the current page, so I canβt transfer anything from the page elsewhere for verification.
The title of your question suggests that you are looking for a way to detect when a page is being refreshed using the F5 key. If in this case you definitely need JavaScript to determine if a key has been pressed. If you would still like to refresh the page, then the answer should help: fooobar.com/questions/1280316 / ... . It takes into account the full URL, as well as the contents of any form.
Add an event unload()that either sets a cookie or starts a PHP session through AJAX. Then, when the page is loaded, check the cookie or session - if it is present even recently, the user has just updated.
unload()
, .
PHP $_SERVER HTTP_REFERER. , - ( - ) , , ..; ( ). F5 ( . , f5).
$_SERVER
HTTP_REFERER
JavaScript . , .
. F5-. close/open, reopen link .. , URI.
F5 . :
, :
LAST_VIEWED_PAGE