consider allowing `only-if-cached` with mode `navigate`
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 2.3k
- Forks
- 403
- Avg merge
- 21h 16m
- Merged PRs (30d)
- 4
Description
In chromium we have a bug about devtools triggering requests with only-if-cached which are then intercepted by service workers. In some site service worker scripts that do something like new Request(evt.request) this blows up because of step 21 here:
https://fetch.spec.whatwg.org/#dom-request
In this case mode is navigate instead of same-origin. Requests with mode navigate, however, must be same-origin to the current context. Could we relax this check to allow only-if-cached if the mode is same-origin or navigate?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Fetch Standard's Request constructor, specifically step 21 of the DOM Request section linked in the issue. Examine how only-if-cached is currently restricted and how navigate requests must be same-origin. Done means the proposed combination is resolved and the standard behavior is specified consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100