Service worker attempts to cache entire web directory prematurely #4549
Closed
Description
Describe The Bug
The service worker downloads 1600 files (60+ MB) on first load, unnecessarily putting load on the server and causing other client requests to be throttled.
Of those files:
- 1103 are fonts (woff2)
- 411 are JS scripts
Since Jellyfin works fine without caching the entire web directory, the behavior seems unnecessary.
Steps To Reproduce
- Go to https://demo.jellyfin.org/stable/web/index.html
- Clear application data and cache
- Open the network console
- Reload the page
Expected Behavior
The service worker need not cache everything, especially given the huge number of files it needs to download.
Screenshots
System (please complete the following information):
- Platform: MacOS
- Browser: Safari and Chrome
- Jellyfin Version: 10.8.9 / 10.8.10
Possible solutions
- Disable premature caching by the service worker
- Limit caching scope to a few big/important files
- Reduce the number of files in the directory (1k font files and 400 JS files in the production bundle may be their own bugs)

Activity