Location.reload() (Method)

Reload the currently displayed page in the window that owns this location object.

Availability:

DOM level - 1
JavaScript - 1.1
JScript - 3.0
Internet Explorer - 4.0
Netscape - 3.0
Opera - 3.0
JavaScript syntax:-myLocation.reload()
-myLocation.reload(aFlag)
Argument list:aFlagA Boolean flag forcing a reload from the server when set to true

This causes the document that owns the Location object to be reloaded. Any form elements would be reset to their initial values.

Unless you specify an unconditional reload, the page will be reloaded from the cache if the file is still in the cache, and caching is still active. This may involve a check on the server to see if the copy in the cache is up to date. If the cache copy is out of date, a new document may be fetched from the server.

You can use the keyword unconditional as an argument in the location.reload(true) method call to force a new copy of the document to be fetched from the server regardless of the disposition of any documents in the local cache. This should also defeat any proxies and force them to reload from the server but it depends on how they are configured.

Refer to the History.go() topic for details of how to perform a benign soft load.

See also:History.go()