Kaminari: Rails endless pagination should remember previous position when back from other page

I’m using Kamaniri gem and jQuery infinite scroll for endless
Everything works perfectly but when I visit other page and back to posts
list page then the pagination starts from first page. Instead of
pagination from first page it should remember the previous post
I tried JavaScript History API: pushState and replaceState to update the
URL according to the scroll position and navigate away from that page
click on browsers back button. It take me to previous scroll positions
scrolling and loading the contains till I get to previous scroll
But this is taking too much of time by scrolling and loading the
What I need is to be instantly back to the previous scroll position when
click browser back button just like in mobile Facebook, Twitter and G+.
What will be the best solution? How can I achieve this task?
Here is the link of my question in
Thanks in advance.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs