Getting a sharepoint page to refresh automatically

Enabling your SharePoint page to refresh automatically after x seconds is as simple as adding a Content Editor web part and adding the following javascript to it in the source editor:


<script type="text/javascript" language="javascript">
var reloadTimer = null;
var sURL = unescape(window.location.pathname);

function setReloadTime(secs)
{ if (arguments.length == 1)
{ if (reloadTimer) clearTimeout(reloadTimer);
reloadTimer = setTimeout("setReloadTime()", Math.ceil(parseFloat(secs)*1000));
}
else
{ reloadTimer = null;
location.reload(true);
window.location.replace( sURL );
}
}

setReloadTime(30);
</script>
Thanks for this go to http://drewmace.blogspot.com/2008/02/auto-refresh-sharepoint-page.html 

Unknown's avatarAbout Dan Wakefield
BI / Data Warehouse Developer

Leave a comment