Update "refresh message" to user

Hi!

In my app, the user is keeping a page on the TV and is almost never refreshed. So when I push an update, it’s often not reflected for the user on that page. Is there a way to notify the user that the page should be refreshed? Something like a banner on top or something.

While writing this I’m getting the idea to:

  • Keeping a variable on the page with the version number of the app
  • When a data update with live socket is done, it also gets the latest version number of the app.
  • A condition to show a banner to refresh, if the version number of the app is not equal to the variable.
  • Setting the variable with the latest version app on page load so that it hides the banner.

Funny that the idea comes when writing it down, so I guess I will try this out now. Just leaving this in case someone has a better idea on how to approach this.

@htatd

Hey did you come up with a solution for this?

If using node simply use web sockets to emit a message and use the socket message to display a message.
Just search websockets for a tutorial

@Hyperbytes

If i make ask for more detail.

say the application is updated by github main branch updates.
After the application restarts/updates wouldn’t all websocket connections be disconnected?

In the above scenario you could emit a message before update which could cause a conditional field to display a “application udated” messagecto allzctive users. Then you update

yeah sounds good. wasnt sure if you were referring to something automatic. i guess could also just have automated/polled request every 30secs to check current update. Anyway plenty of methods

No need to poll socket emit is a push notification

You simply need to add a manual trigger here is tutorial for websockets