9

I disabled service workers in couple of production websites, I can see resource load time is better when using HTTP cache (from disk cache & from memory cache) than with service workers (from serviceworker) when I debug using Chrome devtools (Network tab).

I totally agree service workers gives better control over cache management and for offline usecase.

What other benefits Service worker has over HTTP cache ?

tbnu
  • 126
  • 6

1 Answers1

2

I have the same question. I observed that when service worker is enabled, the "Request to Service worker" takes much longer or equal to than downloading content. And overall http cache was much faster. I am not using the fully offline capability of PWA. Wondering if enabling service worker just for caching is harming performance instead of improving load time. I tried to dig into details by doing a performance audit and checking the communication between main thread and service worker thread, I am guessing it is the communication which is asynchronous in nature and hence takes more time.

sh007
  • 131
  • 1
  • 9