Hi, i have a Joomla site on a Apache/2.2.9 (Unix) mod_ssl/2.2.9 server and i would like it to refresh the page at 1 miniute past each hour to ensure the latest articles are shown, this is a radio website so listeners often have their browser open on the site for hours at a time. Can this snippet be adapted to refresh at 1 miniute past each hour?
function refreshAt(hours, minutes, seconds) {
var now = new Date();
var then = new Date();
if(now.getHours() > hours ||
(now.getHours() == hours && now.getMinutes() > minutes) ||
now.getHours() == hours && now.getMinutes() == minutes && now.getSeconds() >= seconds) {
then.setDate(now.getDate() + 1);
}
then.setHours(hours);
then.setMinutes(minutes);
then.setSeconds(seconds);
var timeout = (then.getTime() - now.getTime());
setTimeout(function() { window.location.reload(true); }, timeout);
}
Thanks