Manage new version uploaded

Hello, I’m creating a website where clients can play games, but I have a hard time finding a solution for when I upload a new version, when a new version is uploaded I don’t want the current clients connected/playing lose their game because a browser refresh, instead I will like to show a pop up saying new version has been uploaded and they can consent to transfer when the game is over.

Does anyone know how I can accomplish that or a workaround?

I appreciate any help you can provide.

Here’s one approach

There are some other approaches in that same thread but this one looked the most straightforward.

Thanks for the quick reply, will try it and update the results here