w3c / w3c/ServiceWorker

Save initial files into cache storage instead of browser's cache

Open
#820 3 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

At this time, there is no way to save intial files which are fetched at the very first HTTP request into CacheStorage. I'm thinking about having a header that handles this issue.

Cache-Control : location=cache-storage

Then developers can easily retrieve those files saved in cache storage on client side.

CacheStrorage.open('main').then(cache => {
    cache.match('/path/to/initFile').then(response => {
        console.log('File exists in cache storage');
    });
});

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 by examining the proposed Cache-Control: location=cache-storage behavior and how initial files from the first HTTP request relate to CacheStorage. Done means developers can retrieve those initial files through CacheStorage on the client side; the issue does not name files or tests to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.