On 4/27/09 6:30 AM, Anne van Kesteren wrote:
Consider having two windows A and B where the session history of A
consists of A1 and in B it consists of B1 and B2. A1 and B2 are both
fully active. A1, B1, and B2 are all same-origin. Now everytime the
Storage object of A1 and B2 are updated B1 will get more and more out of
sync because it does not receive the storage events. That seems bad.

One solution would be to queue storage events for B1 to be dispatched
when it becomes active again but if a lot of storage events are
dispatched it could take a while before the page is functional again
when you go back to it. In naive implementations of such a strategy the
message queue could also be exhausted.

Another solution would be to introduce an event for when a document
changes from inactive to active so the document can reinitialize itself.

You mean something like 'pageshow' event?
https://developer.mozilla.org/En/Using_Firefox_1.5_caching#pageshow_event


-Olli



Thoughts?




Reply via email to