Ollie Williams
Ollie Williams

Reputation: 2514

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

Upvotes: 7

Views: 2306

Answers (1)

Ollie Williams
Ollie Williams

Reputation: 2514

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

Upvotes: 3

Related Questions