Weird caching issues with service worker


#1

guys,

we experienced similar weird caching issues (we needed to hard-refresh everyt time with Ctrl+F5).

We have the service-worker enabled.

It seems like we can resolve this, if we change in service-worker.js the line

self.toolbox.router.any('/*', self.toolbox.cacheFirst);

(which seems to be standard!) to

self.toolbox.router.any('/*', self.toolbox.networkFirst);

Hope it helps anybody…

  • Can anybody confirm, that this helps with the caching issue?
  • Is this the right way to do it? Why is setting like this by default? It seems pretty awful to get updated files to the clients like that…

Thank you,
Arno


Ionic serve cache problem?