How to refresh a SharePoint page automatically in 60 seconds

As I indicated in my previous post, I need to set up a SharePoint page with some frequently-updated lists. And I need this SharePoint page to be refreshed automatically every minute.

Here are some methods I tried.

Method #1: Use Javascript in Content Editor Web part.

A simple Javascript can refresh the web page automatically. To get this method work, you just need to create a Javascript block, and create a new Content Editor Web Part then put the Javascript into it.

The below is the Javascript sample I used.

<script>
var seconds=60;
function countdown(){
    if(seconds>0){
    // document.getElementById("countdownTxt").innerHTML = ‘ (refresh in ‘ + seconds + ‘ seconds)’;} //You do not need this one if you do not want to display the count down text
     else{
    // document.getElementById("countdownTxt").innerHTML = ‘&nbsp;<strong>refreshing now…</strong>’;

location.reload(true);
     }
     seconds-=1;
     setTimeout("countdown()",1000);
}
countdown();
</script>

Method #2, update the Master Page in SharePoint Designer with <meta> tag.

If for some reason, the above method does not work for you. And you can access to the SharePoint site through SharePoint Designer. You can add the auto-refresh <meta> tag at the begin of the HTML code.

<meta http-equiv="refresh" content="60">

Just remember do not put the above meta tag to the Default Master Page. I will suggest you create a Custom Master Page with auto-fresh meta tag, and deploy the Custom Master page to the necessary SharePoint page.

  • Share/Bookmark
Tags: , ,

Related posts

3 Responses to “How to refresh a SharePoint page automatically in 60 seconds”


Leave a Reply



Get Adobe Flash playerPlugin by wpburn.com wordpress themes