Jump to content

check if page refresh


robert_gsfame

Recommended Posts

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.

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.