See: http://friendfeed.com/paul/2b7ddce5/jquery-1-3-breaks-bfcache-because-it-binds
I've got a form in my web app, and if the user submits it and presses the browser BACK button the form values are remembered (e.g. any values the user entered).
Once I add jQuery 1.4.2 to the page (e.g. reference it as a script), then this behaviour changes. From what I've read, this happens because jQuery hooks the onunload event, and this is a signal to browsers that the script is not bfcache-aware, so it turns off bfcache.
UPDATE: I looked into this a bit further, and this problem was fixed in jQuery 1.4 it seems. It looks like the problem was caused by the autocomplete plugin I was using, I'll post a resolution if I find one.
For my forms I use an on submit handler to save each form elements value in a cookie, and then pre populate the fields with that data (in PHP side) .. This way the for always keeps the info, even if the person closes the window and then goes back to it.. Or gets distracted and clicks on some other page..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With