w3c / w3c/ServiceWorker

Don't require Cache API to have a secure context

Open
#1,691 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Posting new issue as https://github.com/WICG/background-fetch/issues/165 was closed with the only comment being that it was in the wrong section

It seems to only require a secure context due to being bundled with Service Workers, but Service Workers are not required for the cache API to be used or have utility. A note on the MDN page (https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage) cryptically suggests that permissions for the Cache API may be "more complex in the future".

There are a number of issues discussing the impact gating features to a secure context either crippling functionality, creating an undue burden (or impossible where no domain name is used) of assigned certificates, or of encouraging users to ignore the warnings when a self signed cert is used. One example is here: https://github.com/w3c/webappsec-secure-contexts/issues/60

Splitting the cache API into it's own spec (https://github.com/w3c/ServiceWorker/issues/879) would remove the conceptual bundling and reflect the fact that the cache API doesn't need Service Workers.

Further, indexedDB does not require a secure context and has it's own spec (https://w3c.github.io/IndexedDB/) so treating Cache API similarly makes sense.

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

Review the linked background-fetch, ServiceWorker, secure-contexts, and IndexedDB issues and specifications first. Determine whether the Cache API should be separated from Service Workers and whether its secure-context requirement should change; done would require an agreed specification direction rather than a localized edit.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.