[Chapter 21] Reference: Location.reload()
Author: David Flanagan
Date: Fri Aug 29 11:17:31 1997

#

| Chapter 21 JavaScript Reference |

# Location.reload() Method

## Name

Location.reload() Method---reload the current document

## Availability

Navigator 3.0

## Synopsis

    location.reload()
    location.reload(force)

### Arguments

`force`

  A Boolean argument that specifies whether the document should be reloaded, even if the server reports that it has not been modified since it was last loaded. If this argument is omitted, or if it is `false`, then the method will only reload the full page if it has changed since last loaded.

### Returns

Nothing.

## Description

The `reload()` method of the Location object reloads the document that is currently displayed in the window of the Location object. When called with no arguments, or with the argument `false`, it uses the `If-Modified-Since` HTTP header to determine whether the document has changed on the web server. If it has, it reloads the document from the server, and if not, it reloads the document from the cache. This is is the same action that occurs when the user clicks on Navigator's Reload button.

When `reload()` is called with the argument `true`, then it will always bypass the cache and reload the document from the server, regardless of the last-modified time of the document. This is the same action that occurs when the user shift-clicks on Navigator's Reload button.

## See Also

"Location", "Location.replace()"

Location.protocol |  | Location.replace()