Consider a package located at URL P that contains 2 resources A and B identified by fragment identifiers #A and #B. If a web page URL uses P#A or P#B, it might be interesting to avoid downloading the entire package when only a small part is needed, or at least to prioritize the download for the parts of the resource being used in the fragment. I’m thinking that such processing could be done in a Service Worker that understands the package format, but unfortunately it cannot at the moment.
Service Workers are meant to behave as a client-side, browser-integrated proxy. As such, they do not receive fragment identifiers in the requested URL of fetch events. However, since a Service Worker is a specific kind of proxy (hey it runs in a browser), I’m wondering if it wouldn’t be interesting to let fragments reach Service Workers. Any thought here ?