Setting Safari to auto-reload?

Hi. I have a small business with a computer set up for cutomers to go on my company's web site. The site has weather information that is constantly updating, and I was wondering if there was a way to set Safari to auto-reload a page every hour, or maybe every few minutes, so the page would always display the most current information... so I don't have to keep clicking on the refresh button myself constantly. I couldn't find anything in the preferences menus, and I was wondering if this was possible... any info would be much appreciated. Thanks!

Posted on Oct 4, 2005 12:38 PM

Reply
6 replies

Oct 4, 2005 6:48 PM in response to Colby Macri

If you have access to the site's HTML and actually code the website, you can have the page auto-reload every x number of seconds by putting the following HTML into the <head> section of the page. You will need to change the line var limit="0:30" to the time as you wish the page to reload.

<script>
<!--

//enter refresh time in "minutes:seconds" Minutes should range from 0 to inifinity. Seconds should range from 0 to 59
var limit="0:30"

if (document.images){
var parselimit=limit.split(":")
parselimit=parselimit[0] 60+parselimit[1]1
}
function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
window.location.reload()
else{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+" minutes and " cursec" seconds left until page refresh!"
else
curtime=cursec+" seconds left until page refresh!"
window.status=curtime
setTimeout("beginrefresh()",1000)
}
}

window.onload=beginrefresh
//-->
</script>

If you don't have access to the code, try this Applescript that will reload the current webpage every 2 minutes (that can be changed) for the frontmost page in Safari.

Hope this helps!
-Ryan

Oct 5, 2005 12:13 PM in response to iBod

I'm the first to admit I'm no expert when it comes to websites, but would a meta refresh tag be simpler and also work with browsers who have turned off JavaScript?


It sure would, iBod 🙂

I just couldn't find an example of it last night when I posted and couldn't remember it off of the top of my head! Thanks!

-Ryan

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Setting Safari to auto-reload?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.