I’m having some issues with the service worker I’ve implemented in the page at this link. I’ve tried to cut the code down as much as possible for this demo, but it’s too long to paste into here.
One problem is that, when the page is fully loaded, and I go to the Application tab of Chrome devtools, and I see rather a lot in the Cache:
It’s not apparent why there is so much cached… it may be the fonts I’m loading but still… seems large.
More worryingly, when I click on the
Clear Site Data button in that section (with all options ticked), the red
Cache Storage part of the pie chart does drop to zero.
Furthermore, when I hit
F5 to reload the page after clearing site data, the service worker fails to install properly again… seems to be stuck on
To get it going again, I have to click on the
unregister link in that section, and then
Another issue I’m having with this code is that the values in the Cache Storage (service worker cache) section are not properly populated:
Content-Length info is zero, and the
Time Cached info is also partially missing.
Thing is, none of these problems is apparent with this service worker example, so it must be something I’m doing wrong.