Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

150
Views
How to test if Workbox precaching is working

My question is very similar to this question.

I'm wondering how I can verify in Google Chrome whether the service worker of my progressive web app is serving precached files from the cache instead of the network.

I have a service worker in place which uses following Workbox code to precache some files:

workbox.precaching.precacheAndRoute(self.__WB_MANIFEST); // WB_MANIFEST gets replaced with the files during the build process

I can verify that those files are cached within Chrome:
enter image description here

Here you can see the style.css in row #0.

When I reload my website I can see in Chrome's network tab that the Service Worker received a request for style.css
enter image description here

After clicking on the style.css entry on the network panel I see following information:
enter image description here

Here I can see the source of Response which says "Service Worker Cache Storage".
Does this mean the style.css was sent from the cache instead of the network to the browser?

I'm a bit confused about that because on this question I can see a console log entry "[workbox]" Precaching is responding to:" which I can't find on my console:
enter image description here

And on this website I can see a separate network entry showing (disk cache) in the size column, which I also don't see on my application:
enter image description here

I don't think this is related to different versions of Google Chrome as I can reproduce the "(disk cache)" entry by using the (demo) link.

This is my service worker code, which is respondig with "Workbox loaded":
enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I've managed it to create offline support for my pwa. So I think the files are loaded from the cache.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!