Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sammy.js cache and scroll position when going back in history

Tags:

I don't know if anyone is still using Sammy.js, but I found it perfectly suits my needs for a lightweight routing and templating library. If anyone has other ideas, please let me know.

My problem is that when I have a long page and I scroll down, click on a link on this page and go back, the whole page is reloaded (in Sammy, the GET route is called) and it jumps to the top of the page.

My question is: Is there a way to have Sammy cache the page and maintain the scroll position when going back in the history?

Thanks in advance.