Firefox has so called bfcache (“Back-Forward Cache”)
that keeps the state of the whole page, including JavaScript context, and restores it when user presses the Back
button. This is separate from the in-browse page (HTTP) cache which stores only the initial page data,
as sent by the server. More on this
here,
here.