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.

Link to comment
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.