const scrollRestoration = history.scrollRestoration;
if (scrollRestoration === "manual") {
console.log(
"The location on the page is not restored, user will need to scroll manually.",
);
}History: scrollRestoration property / notebook
History: scrollRestoration property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
history.scrollRestoration = "manual";