How to refresh a website using JavaScript?

September 10, 2020 - 1 min read

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 😃.