Auto refresh displayed block data

Here’s an alternative script to try. Put this script in the Code inside header of the page that you need to be reloaded.

<script>
    const urlParams = new URLSearchParams(location.search);
    const reload = urlParams.get('reload');
    if (reload ==='true') {
        var newLocation = location.href;
        newLocation = newLocation.replace('reload=true', 'reload=false');
        location.replace(newLocation);
    }
</script>

Then, when you need the page to reload, navigate to it with the querystring ?reload=true. So for example if you are sending the user to /, instead send them to /?reload=true.

What will happen is the page will begin to load, it will detect the reload=true, it will change that value to reload=false, and then it will reload the page one time.