When a page is reloaded, it automatically retains the scroll position. How is it happening?
I need the page to scroll back to the top on each reload.
When a page is reloaded, it automatically retains the scroll position. How is it happening?
I need the page to scroll back to the top on each reload.
Add this to your page between <script> tags:
window.onbeforeunload = function () {
  window.scrollTo(0, 0);
}
This will reset the scroll position when the page is about to unload.
