Hosar Hosar - 29 days ago 16
Javascript Question

How to know, service worker is retrieving data from cache?

enter image description here

I'm trying to get data from cache inside a service worker. But how do I know it's fetching the data properly?

The initiator (index):-Infinity, indicates it comes from cache?

Answer

In Chrome 55 (and possibly earlier versions) the Size column hints what type of cached (disk, memory or service worker) was used when fetching the file.

dev-tools-cache

Comments