GoogleChrome / GoogleChrome/workbox
Long queue time on the initial index.html request during SW update with heavy precache
- Dominant language
- JavaScript
- Stars
- 13k
- Forks
- 880
- Avg merge
- 2h 44m
- Merged PRs (30d)
- 8
Description
Welcome! Please use this template for reporting bugs or requesting features. For questions about using Workbox, the best place to ask is Stack Overflow, tagged with `[workbox]`: https://stackoverflow.com/questions/ask?tags=workbox
**Library Affected**:
workbox-precaching
**Browser & Platform**:
all browsers
**Issue or Feature Request Description**:
notice long queue time on the initial index.html request when SW updates itself, especially when it requires a lot changes in precached assets, it seems the request on handling the index.html got blocked by all the other fetches happening on precache.
repro step is:
1. on a website that precache a lot files (hundreds of them)
2. clear the Cache but keep the service worker - you may also want to disable network cache
3. enable `update on reload` for SW
4. reload
our precache setting is very short:
```
precacheAndRoute(self.__WB_MANIFEST, { ignoreURLParametersMatching: [/.*/] })
```
tho the __WB_MANIFEST is quite a lot, like ~500 assets , and it does include the `index.html` itself, not sure if that's the issue that why `index.html` request itself got queued there - I would expect it will serve the old version with the old service worker before precache finished
Contributor guide
Assessment
This issue has not been assessed yet.