Re:Dealing with releases of single page applications
by hankeypancake on Friday March 11, 2016 @08:37PM
(#11270845)
That crossed my mind as well. Though, that would require both frontend and backend code. This takes around 20-40 lines of javascript and works exactly as intended, and doesn't require maintenance in two or more different places
That said, the way I would've architected this is I'd include a build version # into the distro and provided a checkVersion backend service that would return the current build version # for the client side logic to compare it's build # to.
And if you want to go an extra mile maybe a shouldRefresh service that would only return "true" if the changes that were made require a refresh on the client side.