Is there a way to detect when a new version of a quasar app is loaded?

  • I’m looking for a manner to detect inside a quasar app, when upon startup of the app, a new version of the app is loaded?

  • Do you want something like inform the User that the App has updated?
    You could save your version string to a variable and use websockets to display a message to all users that are not on this current version.

  • @a47ae , Thanks a lot for the prompt reply.

    Well, even not that advanced, without pushing the info from the server.
    Time A: user X uses version 1
    Time B: a new version of the quasar app has been deployed to the webserver, this is Version 2
    Time C: user X opens again the app : So here I need a trigger inside the quasar app (without the help of the server) that the app went from version 1 to version2.
    I want for example to force that bearer tokens are deleted.

    I’m interested also in your web socket suggestion but not for this scenario (btw, do you have a reference to a good example on using web sockets in vueJs) ?
    Thanks a lot for your help

  • Ah, for your described scenario I would store the version in LocalStorage.
    So when the user opens the app the first time, you check the LocalStorage and if there is no version string saved, you save the current version string.
    You could inject the version string during build via webpack or simply always change a constant when a new version is out.
    Then on each initial load of the app you compare the version that is stored as constant/injected via webpack against the version in LocalStorage and take appropiate actions.

    So I only have minor experience, but has a guide on integrating their WebSocket based api into Vue.js. And in general the things that apply to normal JavaScript should work the same in Vue.

  • @a47ae and @damosse31
    Thanks a lot for the precious feedback.
    Warm regards

Log in to reply