Inter-window messaging using localStorage
1–10 of 30 posts
Re: Inter-window messaging using localStorage
#2Re: Inter-window messaging using localStorage
#3This isn't abuse, it's what the storage event was specifically made for. Facebook, Google, etc. have been using this event to update common state information between tabs for quite a while.
I propose we rename it the "Web Storage And Messaging" API.
Re: Inter-window messaging using localStorage
#4Re: Inter-window messaging using localStorage
#5If you want to use localStorage atomically, I found this writeup and code on a LockableStorage interface to be very thorough: http://balpha.de/2012/03/javascript-concurrency-and-locking-...
Re: Inter-window messaging using localStorage
#6This isn't abuse, it's what the storage event was specifically made for. Facebook, Google, etc. have been using this event to update common state information between tabs for quite a while.
I am disappointed I did not have an original thought. Nothing is new in this world. I propose we rename it the "Web Storage And Messaging" API.
Re: Inter-window messaging using localStorage
#7This isn't abuse, it's what the storage event was specifically made for. Facebook, Google, etc. have been using this event to update common state information between tabs for quite a while.
I am disappointed I did not have an original thought. Nothing is new in this world. I propose we rename it the "Web Storage And Messaging" API.
Re: Inter-window messaging using localStorage
#8Re: Inter-window messaging using localStorage
#9Doesn't seem to work in Chrome on iOS?
Re: Inter-window messaging using localStorage
#10""" The use of the storage mutex to avoid race conditions is currently considered by certain implementors to be too high a performance burden, to the point where allowing data corruption is considered preferable. Alternatives that do not require a user-agent-wide per-origin script lock are eagerly sought after. If reviewers have any suggestions, they are urged to send them to the addresses given in the previous section.
More details regarding this issue are available in these e-mails (as well as numerous others):
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-Sep... http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-Dec... """
So as long as you don't need transactions/locks across the shared state, this might work. Of course, transactions/locks are often necessary.