Open Bug 387598 Opened 16 years ago Updated 4 years ago
save and restore contents of bfcache
It would be useful for session restore to save and restore the contents of the bfcache, i.e. the current state of the DOM, including modifications that have been made to it, plus the current state of the JS context. Then AJAX-heavy pages, as well as those that make simple DOM modifications and/or store state in JS variables (like Bugzilla's "Attachment Details" page when the "Edit Attachment as Comment" button has been pressed), can be restored to their previous state without losing context and user-entered data.
I think that would be way too much data for a crash recovery feature to store.
We should rather make sure that we correctly restore sessionStorage (bug 339445) and then let AJAX-heavy pages decide themselves what state they want preserved. Suggesting WONTFIX for Jesse's reason.
That'd be way too much data to write to disk every 10 seconds. -> WONTFIX
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
> then let AJAX-heavy pages decide themselves what state they want preserved That's suboptimal, because it requires pages to opt-in to session restore. Many won't care, which means the overall user experience is not as good as it could be. But I can understand that dumping the full state of the page to the disk every 10 seconds is indeed an overkill. I filed a meta bug to track the cases, fixing which can bring us closer to the ideal of restoring the exact state of the page - bug 450465.
Well, you'd only have to write the net-changed state from those 10 seconds, necessarily. WONTFIX means "we prefer not saving bfcache to saving it, inherently, without regard for quality of implementation"; it's quite a tall bar. Filesystem techniques manage to save incrementally through good use of buffering and data, which makes me suspect that the theoretically-small set of changes that would need to be captured, given the initial page already being in the cache would be quite achievable in an async manner. Not to say that you should work on it, Simon, but that we shouldn't reject the entire capability space completely, as WONTFIX would seem to.
No longer blocks: 450465
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
We might also use the idle service to detect good times to save more data.
You need to log in before you can comment on or make changes to this bug.