Jump to content

Refresh Page?


New Coder

Recommended Posts

Hello all,

 

Is there a way that I can get a page to refresh it's information if navigated to from another page using the refresh button.

 

For instance:

 

A user is viewing page 1, they navigate to page 2, they return to page 1 by preesing the back button. Can page 1 then refresh itself just incase the details have changed since last viewing?

 

Many thanks

Link to comment
Share on other sites

You could of course use $_SERVER['HTTP_REFERER'] and try to come up with a statement that would determine if the user was coming from a page that is ahead of the current page in the site map.

 

<?php
    $ref = $_SERVER['HTTP_REFERER'];
    if (preg_match('/page2.php/i', $ref)) { header("Location: page1.php"); }
?>

Link to comment
Share on other sites

A user is viewing page 1, they navigate to page 2, they return to page 1 by preesing the back button. Can page 1 then refresh itself just incase the details have changed since last viewing?

 

Interesting question!

 

I think this is a browser problem, and since it is browser, you can not achieve this any how.

As my understanding of course.  Maybe someone else have diff idea.

 

Anyway, you can set a refresh timer or something say 10 seconds and browser will refresh itself if updated information.

 

 

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.