I use the following:
header("Refresh:0");
It refreshes the current page after some code executes(or not, your choice)
Also, if you need to redirect it to another page, we can add the target page as following:
header("Refresh:0; url=another_page.php");
It is not advisable to use it unless there is no other option as that 0 will continuously call server and update your local cache as well. If you use 3-4, it will refresh the page every 3-4 seconds.
Many times, if you want to use it with JavaScript alert, it doesn't work or the alert doesn't show up properly. Alternately, we can use JavaScript method as well, like:
location.reload()
The reload() method is used to reload the current document. The reload() method does the same as the reload button in your browser.
functions intervals refresh