[webstorage] inactive documents

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.

Thoughts?


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Monday, 27 April 2009 13:31:22 UTC