Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

151
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda