location: reload() method

The location.reload() method reloads the current URL, like the Refresh button.

The reload may be blocked and a SECURITY_ERROR DOMException thrown. This happens if the origin of the script calling location.reload() differs from the origin of the page that owns the Location object. See Same-origin policy for more information.

Syntax

js

reload()

Parameters

forceGet Non-standard

Pass true to force a reload bypassing the cache. Defaults to false. Only supported in Firefox.

Return value

None (undefined).

Specifications

Specification
HTML Standard
# dom-location-reload-dev

Browser compatibility

BCD tables only load in the browser

See also