robert_gsfame Posted July 19, 2010 Share Posted July 19, 2010 how can i check or detect whether a page is refresh or reload?? Link to comment https://forums.phpfreaks.com/topic/208136-check-if-page-refresh/ Share on other sites More sharing options...
xcandiottix Posted July 19, 2010 Share Posted July 19, 2010 Is using a cookie an option? Or a session? I would think you could write a line of code at the beginning of each page that saves the time and page title. Then every time a page loads up the code checks to see if this page has been viewed before and if so when. If there's a time difference then you'd know they are re-viewing it. If it's with in say... 5 minutes you can bet it's a refresh or reload. Link to comment https://forums.phpfreaks.com/topic/208136-check-if-page-refresh/#findComment-1087980 Share on other sites More sharing options...
AbraCadaver Posted July 19, 2010 Share Posted July 19, 2010 Is using a cookie an option? Or a session? I would think you could write a line of code at the beginning of each page that saves the time and page title. Then every time a page loads up the code checks to see if this page has been viewed before and if so when. If there's a time difference then you'd know they are re-viewing it. If it's with in say... 5 minutes you can bet it's a refresh or reload. Yes, so check the time in a session var etc. but also check if $_SERVER['HTTP_REFERER'] is set. Not foolproof but nothing is. Link to comment https://forums.phpfreaks.com/topic/208136-check-if-page-refresh/#findComment-1087991 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.