Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229612

Ionic serve cache problem?

$
0
0

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


Viewing all articles
Browse latest Browse all 229612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>