View Full Version : Auto Refesh

derek barnstorm
01-17-2006, 08:16 AM
I often update my website and want the homepage to auto refresh just one time on entry. I have found a loy of informayion on refreshing every few seconds but can't find anything on refreshing the page just once.
Can anybody help me?


01-17-2006, 10:09 AM
In head of page:

<META http-eqiuv="REFRESH" Content="60; URL=.">


01-17-2006, 04:41 PM
1) You've mistyped http-equiv;
2) That won't refresh it just one time, now will it.
OP: If you have a server-side language, you should use that to generate the meta-refresh tag like so:
<?php if(!isset($_GET['a'])) echo('<meta http-equiv="refresh" content="0;url=' . $PHP_SELF . '?a"/>'); ?>
<!-- rest of page -->
If not, you will need to do something client-side like this:
<script type="text/javascript">
if(window.location.href.indexOf("?") == -1) window.location.href += "?";
<!-- rest of page -->Of course, better still is to just make sure your server changes its modified times properly. :)