What’s the best practice to make sure the user is using the latest version of my Ember app? By default they have to hit ctrl+F5 to get the latest page resources (JS+CSS) which obviously isn’t optimal. I’ve researched a bit and I think using websockets would make the trick, but I want to ask you first if there’s a common approach for this.
If you don’t use websocket already I would recommend pinging regularly (eg. every minutes) an endpoint that will return the latest version and compare that with the current version. If they are different, you can show a modal to ask your user if they want to reload the page. You can also push some notes about what they would get by updating to the latest version. Also, please, don’t show the modal every minute if the user keep cancelling the modal
Thanks @discourse! That’s a good approach though I ended up opting for web sockets (Pusher) using this add-on https://github.com/ivanvotti/ember-cli-pusher
Weird that there’s not known common practice for something like this yet!
Just found this other article by @cball which tackles the same issue, it might be helpful for anyone else looking for the same solution: http://cball.me/realtime-app-version-notices/
The link for the post doesn’t work anymore.