Ready event on cached pages?
<p>I'd like to fire some code whenever a page is shown in the browser:</p>

<pre><code>$(function() {
   console.log('got ready event!');
});
</code></pre>

<p>This event gets fired only when the browser downloads the page. If I navigate to a different page, then go back, the above snippet won't be fired. It seems that the browser caches the page state, because the server does not receive any requests when the page is shown.
So when I go back to the page, it restores the cached page state without firing the <code>ready</code> event.</p>

<p>Is there an event I can listen to whenever the page is shown, regardless of whether the page is cached or not?</p>
