Skip to content

Service worker attempts to cache entire web directory prematurely #4549

Closed
@Maronato

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

  1. Go to https://demo.jellyfin.org/stable/web/index.html
  2. Clear application data and cache
  3. Open the network console
  4. Reload the page

Expected Behavior

The service worker need not cache everything, especially given the huge number of files it needs to download.

Screenshots

235201537-9a5defd8-7713-4fdd-8059-09947cd03c5a

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingconfirmedThe issue has been verified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions