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.
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 = ‘ <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.
Tags: Javascript, SharePoint, SharePoint Designer
There is problem, becouse I want to refresh only one wikipage. So edit masterpage is not posible and wikipage not accept scripts … Is here any “third” metod? Thank You.
[Reply]
One of the best ways to clean the colon is eating high fiber foods with lots of fluid intake..’:
[Reply]
Thanks i was searching for this code this blog has informative posts which are really useful.
[Reply]