Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Refresh Previous Page

Status
Not open for further replies.
Jan 31, 2001
12
US
We have pages A and B.
From page A, we go to page B.
On Page B, there will be a button to refresh A (previous page).

How to do this?
Is there a referrer.refresh command?
 
Well, you can't refresh the page, but if you put this at the top:

<meta http-equiv=&quot;Cache-Control&quot; content=&quot;no-cache, must-revalidate&quot;>
<meta http-equiv=&quot;Pragma&quot; content=&quot;nocache&quot;>

Then it will refresh everytime you go back to it, even if you back up to it. Is that what you wanted?
 
Code:
opener.document.location.reload(true);

does that help?
-pete
 
Is window b a popup window? If so, you should be able to do this:

window.opener.location = window.opener.location;

I think that should work...
 
>> From page A, we go to page B.

Ok then you need to define that more clearly.

-pete
 
Usually, Refresh means reloading the current page into the browser. Current page is a page B in your case. What do mean when you say &quot;refresh A&quot;?
 
More of a description:

Conditional Refresh Based on Previous Page
When you arrive in page A, we want to check what the previous page was and do a refresh based depending on what page was

If previous page is B ( or *.gov, etc)
then Refresh
otherwise
do not refresh
 
you'll need to use cookies or some other method to avoid an infinite loop, but:

if (document.referrer.indexOf(&quot;whitehouse.gov&quot;) > -1) {
location.reload();
}

=========================================================
while (!succeed) try();
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top