Use of history api to show smooth scroll animation on back press
Preview: https://codersuresh.github.io/scroll-on-back/
- Go to the preview link above
- Scroll down and click on
home
link - Now click on browser back button
- You will see smooth scroll animation