March 28th, 2020
Replying to
Sure. Fire away.
Responses
Stephan Max
Jeremy Keith
The return
part still happens first though. The waitUntil
ensures that the service worker doesn’t “hang up” while you’re getting the fresh version from the network, but while that’s happening, the user has been served the cached file. adactio.com/notes/16636
Jeremy Keith
They’re both asynchronous actions—using cache
and using fetch
—and the waitUntil
ensures that when one of them is done, the other still carries on. It doesn’t mean that one waits until the other is done. adactio.com/notes/16637
Stephan Max
Ah! Got it now! (I think I also confused it with the drawback of this method jakearchibald.com/2014/offline-c…) Thanks for clarifying, that is awesome! All the best for you and your family, stay healthy!