How to refresh a website using JavaScript?

Published September 10, 2020

To programmatically refresh a webpage, you can use the reload() method in the global window.location object using JavaScript.

// refresh a webpage
location.reload();

Feel free to share if you found this useful 😃.


Share on: Facebook Twitter