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!

I have one page which has a back-da

Status
Not open for further replies.

stephence

Programmer
May 29, 2001
23
GB
I have one page which has a back-dated expiry - prompting the browser to reload from the server each time
it's accessed.
From that page I have a mechanism to determine which other pages have changed since the user last visited
them.

I then generate links for each page, and where the page is known to have changed I stick ?R at the end.

For example: <A href=&quot;mychangedpage.html?R&quot;>Changed</A> for a changed page and <A
href=&quot;mynotchangedpage.html&quot;>Not Changed</A> for one which is known not to have changed.

On each page I can then check the search string and force a reload of the page from the server:


See what I mean (get ready to press the 'back button as you'll get alert following alert in NS):

The link to the page:

<HTML><head></head><body>

<A href=&quot;reload.html?R&quot;>Page needing reloading</A>

</body></HTML>

The page 'reload.html'

<HTML><HEAD><TITLE>Reload Once?</TITLE>

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>

<!--

if (location.search.substr(1)==&quot;R&quot;) {

alert(&quot;reloading&quot;);

location.search= &quot;&quot;;

self.location.reload(true);

}

//-->

</SCRIPT></HEAD><BODY>I want to be reloaded once</BODY></HTML>

Please help!

Stephen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top