@slightlylate Perf question: Is there any reason for Service Worker over/together with "Cache-Control: immutable" for immutable asset files?
-
-
Replying to @Loilo92
SW + Cache API gives you "chunky" eviction (vs. HTTP cache). I.e., it's *dependable*
1 reply 0 retweets 0 likes -
Replying to @slightlylate @Loilo92
Let's say you needed some HTML, a bit of JS, some CSS, and a few fonts to start your app offline. HTTP cache might evict only some.
1 reply 0 retweets 0 likes -
Replying to @slightlylate @Loilo92
The result is a broken app (particularly on a flaky network or offline). SW+Cache let you *know* all assets are there
1 reply 0 retweets 0 likes -
Replying to @slightlylate @Loilo92
That's the key to a reliably fast experience.
1 reply 0 retweets 0 likes -
Replying to @slightlylate @Loilo92
Otherwise the network is (sometimes, maybe) in the critical path and experience can appear broken.
1 reply 0 retweets 0 likes -
Replying to @slightlylate
Wow. And that can even apply to already immutable-cached resources?
2 replies 0 retweets 0 likes -
Replying to @Loilo92 @slightlylate
Let me concretize the scope: This is about a company website (not PWA) that doesn't work offline. Would SW still be recommended there?
1 reply 0 retweets 0 likes
Well, it should work offline ;-) If you don't need reliability, don't bother with either.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.