Javascript Browser Location reload() Method

Introduction

The reload() method is used to reload the current document.

The reload() method does the same as the reload button in your browser.

By default, the reload() method reloads the page from the cache.

We can force it to reload the page from the server by setting the forceGet parameter to true.

location.reload(forceGet);

Parameter Values

Parameter
Type
Description
forceGet



Boolean Optional.
Sets the type of reloading:
false - Default. Reloads the current page from the cache.
true - Reloads the current page from the server

The reload() method has No return value.




PreviousNext

Related