This isn’t exactly what I’m doing but its close enough.
Lets say I want to implement something simple. Like a todo list that stored serverside.
Lets say it is also popular and i’m worried a bit about people will have 200+ items.
I want to be able to reorder items. I know how to reorder in javascript but because i’m worried about 200+ items I don’t want to send the ENTIRE LIST over the network.
So i’ll simply send what moved and its new position. But now this is my problem. I want to allow OLD windows or MULTIPLE windows not to cause conflict. The old or other window would not know the most up to date order and reordering with out of date order would cause problems.
Is there some kind of IPC I can use to say hi other window this is the new order/html/whatever? If not then can I do something simple like send it a few ints (cmd and its arguments essentially). How would I do this?
Restrictions: It can not talk to the server. It isn’t required to work if a user has another browser instance.
You could store references to the todo list in local storage. On changes, sync to local storage and to the server. On the initial page load, rehydrate the local storage.