History: scrollRestoration property - Web APIs | MDN
The scrollRestoration property of the History interface allows web applications to explicitly set default scroll restoration behavior on history navigation.