I'm writting a progressive webapp and implemented a stale while revalidate strategy to handle some of the requests sent by the application.
Checking the network tab in the devtools, i'm seeing that those requests are correctly marked as served from ServiceWorker
. However some of them appeared to be quite long (from 200ms to 500ms), so i checked the timing details and found that most of the time was spent in Request to ServiceWorker
This link tells us that Request to ServiceWorker
refers to "The request is being sent to the service worker.
" But it doesn't tell us much on what is actually occurring during this phase and if there is anything we could do to optimize it.
Searching the web, i didn't found futher details about that (only this previous stackoverflow post describing a similar issue).
Does someone have any details on what is actually going on during this Request to ServiceWorker
phase ?