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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to force a page refresh?

Status
Not open for further replies.

jrpatdlgs

Programmer
Joined
Mar 28, 2000
Messages
62
Location
US
My website contains many subject oriented "menu" pages, each of which in turn provides links to many government documents. Whenever a new document is added to the library of docs available, the menu page for that subject area is edited to provide the new link. Someday we'll have the thing data-based but for now I need a way to force a page refresh everytime a user revisits any of the menu pages. Without such a forced refresh the user may miss out on new documents that are available because the page reloads from his hard drive cache instead of loading new from the site server.

I've inserted the following html code (provided by an earlier Tek-Tips response) in my pages but it does not work. <META HTTP-EQUIV=&quot;Pragma&quot; CONTENT=&quot;no-cache&quot;> I'd appreciate it if anyone could troubleshoot that code or provide fairly detailed instructions as to some other way to force the refresh.

Thanks very much. Your help will be greatly appreciated.
 
I just ran across and thought it might help.

Description: The &quot;Expires&quot; value for the HTTP-EQUIV attribute gives as its CONTENT value a date [Date Value]. The Expiration value is used to indicate to a browser when time-sensitive information becomes old. Browsers must not cache the requested page beyond the date given. The presence of an EXPIRES field does not imply that the original resource WILL change or cease to exist at, before, or after the time indicated, but does speak to the expected timeliness of the material. Setting the CONTENT attribute to a date in the past, or even to an illegal value of &quot;0&quot; tells the browser to always look for a new version of the page.

Syntax: <meta HTTP-EQUIV=&quot;Expires&quot; CONTENT=&quot;[Date Value]&quot;>


Hope it helps. =)
 
Try putting both these in.

<meta http-equiv=&quot;expires&quot; content=&quot;0&quot;>
<meta http-equiv=&quot;Pragma&quot; content=&quot;no-cache&quot;>

I have a shopping cart system and had the same problem, second line didn't work on its own. Works with the first one added.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top