enhancement proposal: make jQuery bfcache friendly

enhancement proposal: make jQuery bfcache friendly


Hi,
I noticed something a little bit annoying when jQuery is loaded on a
page: Firefox bfcache is turned off because an unload handler is
attached on the window to prevent memory leaks in IE:
jQuery(window).bind("unload", function() {
    jQuery("*").add(document).unbind();
});
See http://developer.mozilla.org/en/docs/Using_Firefox_1.5_caching for
more detail about the bfcache and when it is turned off. Having the
bfcache turned off is particularly visible if you go back to a large
page: Firefox has to parse the whole page again instead of having the
page displaying instantly from the bfcache.
The pagehide/pageshow events can be used instead of unload, and do not
disable the bfcache.
Sylvain