All connected clients refresh when prototype gets updated and one client hits 'reload'

Didn’t know how to properly title this, so here goes.

If a prototype gets updated in the Noodl editor, and then it’s refreshed on an external client manually (hit refresh button on a browser) the client seems to be ‘refreshed’ on all other clients too, as if someone hits the refresh button on other browsers. This might be fine but I believe some of the ‘clean up’ things that I have for a collection for example don’t get executed. What that leaves me with in the end is 2 ‘disconnected’ clients (I’m using websockets) and a collection with 2 connected ID’s. This is different if I manually hit a refresh button on a browser since I do ‘clean-up’ with window.addEventListener(“beforeunload”, function (event) {}; on a client to delete an itemID from a collection. Strangely this does not get called in the above mentioned instance.

Any ideas of what might be happening in the background and how to deal with this.

Oh and ideally I could have some sort of access to a ‘client’ ID which would be tracked by a noodl node. This would save a ton of time rigging together a hodge-podge client manager :slight_smile:

Thanks!

Hi,

So I’m still a bit confused as to when a prototype gets reloaded on a client machine. I don’t mean if you change a rectangle color from white to red ‘refreshed’ but reloaded as if I hit the reload button on a browser. So far I’ve experienced it when 1) having send messages in the prototype (bug mentioned in earlier posts) 2) If I change a prototype and hit ‘refresh’ on one clients, all other clients will reload, mentioned above. I also seem to experience a ‘reload’ on a client when another client opens a browser window - I don’t know however why that happens. Seems like there might be some internal messaging going on which causes it.

The reason why I’m asking is if I have 3 clients for example with 3 unique model properties created as they open Noodl, as the 4th client opens the prototype 3 new models get created because of this behavior, in the end having 7 models, instead of 4. I’m oversimplifying the example of course. In any of the cases mentioned above I have to deal with ‘clean-up’.

Thanks,
Regi