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

Some browsers are reusing 'no-cache' cached images without revalidation #1088

Closed
youennf opened this issue Sep 3, 2020 · 4 comments
Closed

Comments

@youennf
Copy link
Collaborator

youennf commented Sep 3, 2020

As discussed in https://bugs.webkit.org/show_bug.cgi?id=216048, it seems Chrome and Firefox are not always obeying 'Cache-Control: no-cache' directives, at least for image loads with directives like 'Cache-Control: public, max-age=31536000, no-cache'.
WebKit is currently revalidating such image loads which has a perf impact.
If both Chrome and Firefox are actually skipping revalidation in some cases, it might be worth documenting that in the fetch spec.

@mnot
Copy link
Member

mnot commented Sep 3, 2020

This sounds like the memory or image cache - see #590 and #354. All browsers currently will not reuse a response with no-cache even when it contains max-age -- see test results.

@youennf
Copy link
Collaborator Author

youennf commented Sep 3, 2020

@yoavweiss mentioned this might be defined as part of https://html.spec.whatwg.org/#updating-the-image-data:list-of-available-images

@youennf
Copy link
Collaborator Author

youennf commented Sep 4, 2020

WPT PR: web-platform-tests/wpt#25380
Looking at the HTML spec, the cache is per document which does not seem to be what Chrome and Firefox are implementing.
Closing the issue since this might not end up in fetch spec land until we define the memory cache.

@youennf youennf closed this as completed Sep 4, 2020
@annevk
Copy link
Member

annevk commented Sep 7, 2020

It's sorta-per-document as it can be reused across documents. Basically that needs to be revamped with a properly defined memory cache.

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

No branches or pull requests

3 participants