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

Difference between disk and memory cache #1174

Closed
mishk0 opened this issue Jul 24, 2017 · 2 comments
Closed

Difference between disk and memory cache #1174

mishk0 opened this issue Jul 24, 2017 · 2 comments

Comments

@mishk0
Copy link

mishk0 commented Jul 24, 2017

If the browser gets a file from its disk cache - it triggers a fetch event in SW, If gets from memory cache - it doesn't trigger a fetch. Is this behaviour according to spec? Reproduce it in Chrome (version 59.0.3071.115)

@wanderview
Copy link
Member

I don't think chrome memory cache is spec'd. There are some memory caches that are spec'd, though, like image cache.

Related to integrating this stuff to SW see #962.

@jakearchibald
Copy link
Contributor

The img cache is spec'd to come before service worker. Unfortunately, other memory caches, such as <link rel=preload> aren't spec'd, but I expect them to behave like <img> in terms of their cache relative to the service worker. Namely:

  • Their caches come before the service worker. As in, you'll get no fetch event if there's a cache hit.
  • Fetches generated by these things will go through the service worker.

Closing in favour of whatwg/fetch#354.

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

3 participants