From c7d112ad5dc6f88a05cfc96e6d5dca36ec0250a7 Mon Sep 17 00:00:00 2001 From: Chris Krycho Date: Thu, 21 Mar 2024 17:20:14 -0600 Subject: [PATCH] Show a usable example of Location.reload() (#32787) --- files/en-us/web/api/location/reload/index.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/files/en-us/web/api/location/reload/index.md b/files/en-us/web/api/location/reload/index.md index df9920c43502255..f5c14fde6cdd0bd 100644 --- a/files/en-us/web/api/location/reload/index.md +++ b/files/en-us/web/api/location/reload/index.md @@ -30,6 +30,13 @@ None ({{jsxref("undefined")}}). - `SecurityError` {{domxref("DOMException")}} - : Thrown if the {{Glossary("origin")}} of the script calling the method is not the {{Glossary("Same-origin policy", "same origin")}} of the page originally described by the {{domxref("Location")}} object, mostly when the script is hosted on a different domain. +## Examples + +```js +// reload the current page +window.location.reload(); +``` + ## Specifications {{Specifications}}