In JavaScript, the reload() method of the Location object is used to reload the current web page.

Here is an example:

location.reload();

You can also pass an optional boolean parameter to reload() to force the browser to reload the page from the server:

location.reload(true);

If you pass the false value or skip it entirely, the browser may reload the page from its cache.

Take a look at JavaScript location object tutorial to learn more about the Location object properties and methods.

✌️ Like this article? Follow me on Twitter and LinkedIn. You can also subscribe to RSS Feed.