Encountering an issue with my Vue application. It comprises more than 40 pages, and the problem lies in the browser caching the scroll position. As a result, when users navigate from one page to another, the browser displays the scroll position of the previous page. This can obstruct the top content of the new page, requiring users to scroll up in order to view the full content. Clearly, this undermines the user experience.
I stumbled upon a potential solution here. However, it involves copying and pasting the solution into all 40 page views, which is not the most efficient approach. Are there any alternative solutions available?