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!

Force a page to reload?

Status
Not open for further replies.

lotsToLearn

Programmer
Jun 10, 1999
9
CA
Is it possible to use JavaScript to force a page to read from the server instead of a clients cache? I am having a real problem with IE5 users reading pages from cache instead of from the server. <br>
<br>
As always, any and all suggestions are appreciated. <br>
<br>
ALH
 
You can use location.reload() but that might not work on browsers older than IE 5.0<br>
<br>
robacarp.webjump.com
 
Actually, this is done through the http-equiv header, as follows:<br>
&lt;META HTTP-EQUIV=&quot;Expires&quot; CONTENT=&quot;Wed, 16 MAY 1996 14:00:00 GMT&quot;&gt;<br>
<br>
This will cause the UA to read the page as expired (in it's cache) so it will ALWAYS reload the page. <p>John Vogel<br><a href=mailto:johnvogel@homepage.com>johnvogel@homepage.com</a><br><a href= HomePage</a><br>WebMaster - DataBase Administrator - Programmer<br>
 
Agree with Jvogel....the best way is through a meta-expires tag; but it works best if you set the value to a date that's already past; then it always forces a reload every time they go to the page ;) <p>-Robherc<br><a href=mailto:robherc@netzero.net>robherc@netzero.net</a><br><a href= > </a><br>*nix installation & program collector/reseller. Contact me if you think you've got one that I don't :)
 
Sorry, that is agreeably better, but the location.reload() is the first thing that came to mind.<br>
<br>
theEclipse<br>
robacarp.webjump.com<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top