ServiceWorker is the new api available in Chrome. One of the many things that it allows you to do is to intercept network requests and respond with a cached version. I implement the button "Accept this offline", which dynamically adds things to the cache. I would like to tell the user how much space I use and how many entries I put into the cache.
Is it possible to request a cache to get the number of elements in it? Can I tell you about the total size of the items cached in it?
source share