paulirish/infinite-scroll — pull request #496 by clockworkgeek (2014-01-31 22:48:13+00:00)
Title: Fix browser back button!

Here is an experimental use of sessionStorage. Asynchronous content is cached temporarily (i.e. only until the browser tab or window is closed) and restored whenever infinite scroll is initialised, which is normally on page load. When using the back or forward buttons a browser typically attempts to restore the scroll position *after* page load, which means the content should have been restored by then. This fixes [the biggest complaint of infinite scrolling](https://github.com/paulirish/infinite-scroll/wiki#disadvantages).

This feature is graceful, it checks for the existence of sessionStorage rather than failing. For better compatibility you can use [this sessionStorage shim](https://code.google.com/p/sessionstorage/).