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?
Derek.
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?
Derek.
In head of page:
http://www.google.com/search?q=meta%20refreshCode:<META http-eqiuv="REFRESH" Content="60; URL=.">
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:If not, you will need to do something client-side like this:PHP Code:<html>
<head>
<?php if(!isset($_GET['a'])) echo('<meta http-equiv="refresh" content="0;url=' . $PHP_SELF . '?a"/>'); ?>
<!-- rest of page -->Of course, better still is to just make sure your server changes its modified times properly.Code:<html> <head> <script type="text/javascript"> if(window.location.href.indexOf("?") == -1) window.location.href += "?"; </script> <!-- rest of page -->![]()
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Bookmarks