Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Navigation.reload() does not trigger popstate event (mdn#42303)
* Navigation.reload() does not trigger popstate event

* Update files/en-us/web/api/navigation/reload/index.md

Co-authored-by: Brian Smith <[email protected]>

---------

Co-authored-by: Brian Smith <[email protected]>
  • Loading branch information
hamishwillee and bsmth authored Dec 15, 2025
commit d761f12b87a1cc18e37ed9b889ee1aecdb64c255
13 changes: 9 additions & 4 deletions files/en-us/web/api/navigation/reload/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ browser-compat: api.Navigation.reload

{{APIRef("Navigation API")}}

The **`reload()`** method of the
{{domxref("Navigation")}} interface reloads the current URL, updating any provided state in the history entries list.
The **`reload()`** method of the {{domxref("Navigation")}} interface reloads the current URL, updating any provided state in the history entries list.

Note that `reload()` does not trigger the [`popstate` event](/en-US/docs/Web/API/Window/popstate_event), as this is only fired for soft navigations that cause a "traversal" of the history entries.

## Syntax

Expand All @@ -23,9 +24,13 @@ reload(options)
- `options` {{optional_inline}}
- : An options object containing the following properties:
- `state` {{optional_inline}}
- : Developer-defined information to be stored in the associated {{domxref("NavigationHistoryEntry")}} once the navigation is complete, retrievable via {{domxref("NavigationHistoryEntry.getState", "getState()")}}. This can be any data type. You might, for example, wish to store a page visit count for analytics purposes, or store UI state details so the view can be shown exactly as the user last left it. Any data stored in `state` must be [structured-cloneable](/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm).
- : Developer-defined information to be stored in the associated {{domxref("NavigationHistoryEntry")}} once the navigation is complete, retrievable via {{domxref("NavigationHistoryEntry.getState", "getState()")}}.
This can be any data type. You might, for example, wish to store a page visit count for analytics purposes, or store UI state details so the view can be shown exactly as the user last left it.
Any data stored in `state` must be [structured-cloneable](/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm).
- `info` {{optional_inline}}
- : Developer-defined information to be passed along to the {{domxref("Navigation/navigate_event", "navigate")}} event, made available in {{domxref("NavigateEvent.info")}}. This can be any data type. You might, for example, wish to display newly-navigated content with a different animation depending on how it was navigated to (swipe left, swipe right, or go home). A string indicating which animation to use could be passed in as `info`.
- : Developer-defined information to be passed along to the {{domxref("Navigation/navigate_event", "navigate")}} event, made available in {{domxref("NavigateEvent.info")}}.
This can be any data type. You might, for example, wish to display newly-navigated content with a different animation depending on how it was navigated to (swipe left, swipe right, or go home).
A string indicating which animation to use may be passed in as `info`.

### Return value

Expand Down