Refresh PWA after code update



  • Hi,
    When I update my Quasar PWA application code on the server, the server worker seems doing its job of getting the new updates :
    0_1542068039565_2d7b77d7-7da6-4a34-991c-6d381813576e-image.png

    But the new files are only uploaded in a -temp cache and the PWA app is not updated:

    0_1542068525166_154fd333-8a6a-4bf0-9ded-256d28546163-image.png

    I’ve tried to call window.location.reload(true) but this didn’t work.
    The only solution I have is to clear the cache and load the app again.

    What is the right way to refresh the Quasar PWA app after an update?

    Thank you!

    Update:------------------------------------
    skipWaiting: true seems to solve the problem
    workboxOptions: {
    skipWaiting: true
    }

    I’m trying to understand more:
    https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle