HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Location reload() Method

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


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The reload() method is supported in all major browsers.


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 - The current page must be reloaded from the server

Return Value

No return value.


Location Object Reference Location Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE