bkad / prat

group chat with markdown served over websockets
11 stars 6 forks source link

Refresh page on reconnect when server version updates #60

Open cespare opened 11 years ago

cespare commented 11 years ago
  1. Have a server version baked the client is given when the page loads (timestamp of when the server started, but better yet would be the SHA-1 of the current software)
  2. In the reconnection logic, query the server version.
  3. If the version is > current version, reload the page.

This will avoid having to ask people to reload to get the cool new features. Silently push updates to users!

cespare commented 11 years ago

After discussing with @bkad we've opted for closing down the connection and opening a 'please refresh' dialog instead. This will be more disruptive but will not confuse the user as to why their page magically reloaded.

mdietz commented 11 years ago

sgtm.