The Mudcat Café TM
Thread #119085   Message #2580034
Posted By: treewind
03-Mar-09 - 03:09 AM
Thread Name: Tech: Websites - forcing a page refresh
Subject: RE: Tech: Websites - forcing a page refresh
I think this is what you need:
In the <HEAD> section of your page:

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">

This is the equivalent of a sever sending a "Cache-control: no-cache" header, and tells the browser not to store the page in its local cache, so next time you load the page it must come direct from the web server.

It's a bad idea to overdo this, as caching of pages saves a lot of server time and bandwidth.

---

There's a whole lot of other cache settings that can be set, like expiry times. (either a time and date, or some thing like "expire after 300 seconds")

The "refresh" thing is different - that makes the browser reload the page at intervals without your doing anything. It's useful if you have live data that updates every few seconds, but it can put one hell of a load on the server if a lot of people are watching it at once. You can also use the refresh to load a different page, which is used for those "this will automatically redirect in 10 seconds" type messages

Anahata