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
location.reload();
Specifications
Specification | Status | Comment |
---|---|---|
HTML Living StandardThe definition of 'Location.reload()' in that specification. | Living Standard | No change from HTML5. |
HTML5The definition of 'Location.reload()' in that specification. | Recommendation | Initial definition. |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
reload
|
Chrome
Full support 1 |
Edge Full support 12 Full support 12 Notes' Before Edge 79, if a page added to Trusted Sites contains a cross-origin iframe, then calling |
Firefox
Full support 1 |
IE Full support 5.5 Full support 5.5 Notes' If a page added to Trusted Sites contains a cross-origin iframe, then calling |
Opera
Full support 3 |
Safari
Full support 1 |
WebView Android
Full support 1 |
Chrome Android
Full support 18 |
Firefox Android
Full support 4 |
Opera Android
Full support 10.1 |
Safari iOS
Full support 1 |
Samsung Internet Android
Full support 1.0 |
Legend
- Full support
- Full support
- See implementation notes.'
- See implementation notes.
See also
- The
Location
interface it belongs to. - Similar methods:
Location.assign()
andLocation.replace()
.
Location: reload() by Mozilla Contributors is licensed under CC-BY-SA 2.5.