Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lewispham opened this issue Jan 20, 2016 · 2 comments
Open

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

lewispham opened this issue Jan 20, 2016 · 2 comments
Milestone

Comments

@lewispham
Copy link

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');
    });
});
@jakearchibald
Copy link
Contributor

Is this intended for the initial html request?

@lewispham
Copy link
Author

@jakearchibald Yes. The initial html request and its following ones.

This issue is actually for getting rid of browser cache. I think having 2 layers of cache is quite hard to manage. Besides this one, there is also another problem with http2 requests. Developers are currently unable to directly save pushed files into CacheStorage. This is also the reason behind my suggestion of using this header Cache-Control : location=cache-storage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants