Location reload() Method
THE WORLD'S LARGEST WEB DEVELOPER SITE

Location reload() Method

❮ Location Object

Example

Reload the current document:

location.reload();
Try it Yourself »

Definition and Usage

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, but you can force it to reload the page from the server by setting the forceGet parameter to true: location.reload(true).


Browser Support

Method
reload() Yes Yes Yes Yes Yes

Syntax

location.reload(forceGet)

Parameter Values

Parameter Type Description
forceGet Boolean Optional. Specifies the type of reloading:
  • false - Default. Reloads the current page from the cache.
  • true - Reloads the current page from the server

Return Value

No return value

❮ Location Object