Refreshing a blog page.

I have a normal page with custom blog feed added to it. I wanted to refresh the page after every minute so new posts automatically show. We produce a blog at 10:30 on a Sunday morning and people are normally waiting on the page a 10:25 so wont see the post with out having to refresh.
www. riversidechurch. org. uk/hub

I had been using :

import wixLocation from ‘wix-location’ ;
$w.onReady( function () {
setTimeout(() => [wixLocation.to(wixLocation.](wixLocation.to(wixLocation.) url), 60000)//TIME IN MILLISECONDS
})

However, this week everything changed (nothing had been altered). When people clicked on the new post and it went to the new page www. riversidechurch. org. uk/post/… after one minute this would also automatically refresh after the minute and send the user back to the original page. It has never done this before today. The post page has no extra programming. Any help to stop this would be appreciated.

I’m looking at your site and don’t see the problem. I clicked on the post “Thought for the Day : David Jones : 11/11/20”. I was redirected to the post page. I then waited about 5 minutes and nothing happened - it stayed on the post page.

What am I missing?

At the moment I’ve got the refresh blanked out as people are needing to use the site. As you can see on the blog page there is a video, by the time people were pressing play, the page would refresh and go back to the main hub page.

@jimbray42 How can I test the problem?

I will try and copy the page, give me a few minutes.

I’ve copied the hub page to www. riversidechurch. org. uk/hub2 this is now causing the problem, the only difference is the settimeout

Got it! Please leave hub2 in place so that the team can properly evaluate.

BTW - if you want to refresh every minute, you should be using setInterval instead.

Try it now - it should work. You might need to count to 100.

how would i use setinterval? sorry, I’m not a programmer.

Thank you, do you know what the problem was. Can I now re-enable it on the normal hub page.

The issue seems to be related to a recent performance release. I changed the configuration of your site to exclude the update.

You can re-enable the normal hub page. Leave hub2 so that the team can evaluate.

Try this:

setInterval(() => wixLocation.to(wixLocation.url), 60000);

Will do, thank you.