files/en-us/web/api/navigation/reload/index.md
{{APIRef("Navigation API")}}
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, as this is only fired for soft navigations that cause a "traversal" of the history entries.
reload()
reload(options)
options {{optional_inline}}
state {{optional_inline}}
state must be structured-cloneable.info {{optional_inline}}
info.An object with the following properties:
committed
finished
intercept() handler are fulfilled. This is equivalent to the {{domxref("NavigationTransition.finished")}} promise fulfilling, when the {{domxref("Navigation/navigatesuccess_event", "navigatesuccess")}} event fires.Either one of these promises rejects if the navigation has failed for some reason.
DataCloneError {{domxref("DOMException")}}
state parameter had values included in it that are not structured-cloneable.async function handleReload() {
await navigation.reload({
info: { animation: "fade-in" },
state: { infoPaneOpen: true },
}).finished;
// Update application state
// …
}
Reload page and add a new state item:
async function handleReload() {
await navigation.reload({
state: { ...navigation.currentEntry.getState(), newState: 3 },
}).finished;
// Update application state
// …
}
{{Specifications}}
{{Compat}}