How to incorporate working back/forward buttons? (ajax, history.js)

Hi there,

The simple answer is to use pjax which accomplishes what you’re wanting to do.

If you want to do things manually though you’ll need to cache all of the content in an array or hash and load that content back when the history changes onpopstate https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate