I use the following:
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:
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.
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