w3c / w3c/ServiceWorker

should FetchEvent.request ever be a range request if we cannot verify if the underlying resource is the same?

Open
#1,201 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

TPAC2026
Dominant language
Bikeshed
Stars
3.6k
Forks
324
Avg merge
14d 22h
Merged PRs (30d)
1

Description

It seems that in firefox we avoid using partial response and range requests if:

  1. The server cannot support range requests
  2. The underlying resource has changed since the previous part of the resource was received

See:

https://searchfox.org/mozilla-central/source/netwerk/base/nsIResumableChannel.idl#13

If we allow range requests through FetchEvent.request, how can we ever know if the underlying resource has changed? Normally we depend on the http cache to detect if a change has taken place, but we don't have that here. The service worker could return completely different data each time.

Does chrome have similar "detect if something changed" behavior for range requests?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked nsIResumableChannel.idl entry and compare Firefox's range-request behavior with Chrome's handling of FetchEvent.request. Determine whether the Service Worker specification needs to define behavior when the underlying resource may have changed, then document the agreed requirement in the relevant specification text.

Written by the indexing model from the issue text.

Assessment

Domain
api, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.