Window interface has access to the
Location object that can be used via
Using that interface, you can reload the page with the
That function will reload the current URL, just like the refresh button would do in a browser.
You can test this by opening the developer tools in your favorite browser and call the
For more information on the browser support for this method, see its MDN web docs page.
Thanks for reading and happy coding!