I want my PWA to periodically update itself while it is running, not waiting for the user to refresh the page (e.g. on iOS 12 it is actually quite hard to trigger page reload of a PWA).
I know there is ServiceWorkerRegistration.update() method, but it's not supported by Safari.
So, are there any workarounds to get my ServiceWorker to self-update without page reload on iOS?
Additional information:
Currently I periodically poll version.json file in which I put current app's version, compare it, and force a page reload. It works fine, but it requires two page reload to get the new version (this + after the activated event to load the new app's assets).
Here's my current solution, if you need more context: https://github.com/dimaip/calendar/blob/master/app/serviceWorker.js#L31