Sign in or Join FriendFeed
FriendFeed is the easiest way to share online. Learn more »
Paul Buchheit
jquery 1.3 breaks the bfcache because it binds the onunload event. This makes the back button slower and more annoying. See https://developer.mozilla.org/En... for more info on the bfcache.
http://groups.google.com/group... for some discussion (including a reply from John Resig) - Benjamin Golub
So is the bfcache part of the reason that Firefox tends to use so much memory? - Robert Felty
I don't know why Firefox uses so much memory, but the bfcache is a good thing, and people should avoid breaking it. - Paul Buchheit
Odd, the issue trail seems to suggest this was only added to address problems in IE and Firefox 2, but Resig is reluctant to remove it for other browsers due to tidiness issues? Seems like there's a part of the story missing. - Mark Trapp
The point of the bfcache is that the page is left intact so that it can be restored very fast. This practice of doing manual de-allocation on page unload is insane -- it's sadly necessary for IE, but is not something that we should be doing for non-broken browsers. - Paul Buchheit
Here is one way to fix it: $.event.remove(window, "unload"), but I don't know if jquery1.3 is depending on this event. For now, I may just stick with 1.2.1. - Paul Buchheit
Thanks for the fix Paul, we're still using 1.2.6, which appears to have the problem, too. Nobody's complained about it yet, but this is probably going to be a larger issue for us in the near future. - Mark Trapp
Has anyone found a workaround for this yet? E.g. is there a way to use jQuery without breaking bfcache so that browsers can 'remember' form values? - Alex Black