Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Service Worker confusion in Network Tab

I have registered a service worker. So far I have only explicitly cached a very small amount of static resources (a stylesheet and a couple of images). When I go to the application tab of Chrome devtools, they're there in the cache storage, as expected.

What is confusing me is that in the Network tab while some things say 'from disk cache' (which is what i would expect) a lot of resources other than those in my cache storage are saying 'from ServiceWorker'. Does service worker cache some things automatically?

enter image description here

like image 399
Ollie Williams Avatar asked Aug 01 '17 09:08

Ollie Williams


Video Answer


1 Answers

I suppose the network panel is just reflecting the fact that the request has been intercepted by the service worker with the fetch event listener

like image 106
Ollie Williams Avatar answered Sep 30 '22 18:09

Ollie Williams