View Full Version : Automatically refreshing website
Hi,
How do I get my web site to automatically refresh each time a visitor accesses my page, without the visitor having to click on the refresh button. we want our visitors to know when we've made changes and I'm afraid alot of them are not real web savy. Any help would be greatly appreciated.
jw
Statica
01-31-2001, 09:30 AM
When you say refresh automatically do you mean refresh from ur server as opposed to refreshing from a "stale" copy on their cache? Or do u mean like a refresh every 60 seconds or so? The second scenario would still involve a lot of refreshes from the cache.
The latter is achieved by using the META tags:
(META HTTP-EQUIV = "Refresh" CONTENT = "60; URL=http://www.yoururl.com")
The former scenario has a few more considerations, on the surface what you can do is put an expiration on your META tags, like
(META HTTP-EQUIV="Expires" CONTENT="Wed, 31 Jan 2001 12:01:00 GMT")
date format: per the RFC850 specifications - http://www.alternic.org/rfcs/rfc800/rfc850.txt
or use of META PRAGMA
(META HTTP-EQUIV="Pragma" content="no-cache")
Unfortunately though, the Pragma usage isnt supported and most new browsers keep caching.
HTTP 1.1 ( http://www.w3.org/Protocols/rfc2068/rfc2068 ) also stipulates teh usage of such equivalents as:
<b>max-age=<i>time in seconds</i></b>
<b>must-revalidate</b>
<b>no-cache</b>
<b>proxy-revalidate</b>
<b>public</b>
<b>s-maxage=<i>time in seconds</i></b>
Check out the cachenow campaign pages: http://vancouver-webpages.com/CacheNow/
<HR>
If you are the webserver admin, you can achieve all of the above (and circumvent your website visitor's knowledge of browsing and caching) by server side scripting on your webserver. Its fairly straightforward, either in the conf files or writing CGI to achieve it. User server side mod includes like : http://httpd.apache.org/docs/mod/mod_include.html for apache
http://www.php.net/manual/function.header.php3 for PHP3/4
etc
Anyhoo this is a largish topic, but I might have already ventured of the very deep end. HTH
Cheers
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.