Auto refresh current page with regular intervals using JS

To refresh or reload active or current page using JavaScript, you can use the location.reload() and setTimeout() methods. The reload() method does the same as the reload button in your browser.The setTimeout() method calls evaluates an expression after a specified number of milliseconds.

By default, the reload() method reloads the page from the cache, but you can force it to reload the page from the server by setting the forceGet parameter to true: location.reload(true).

Example script to Auto refresh current page

Source code of a sample HTML page that reloads page with 3 seconds regular intervals.

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.