Consider not making referrer policy cause cache misses for images and CSS caches.
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(3 files)
annevk: btw, should referrer policy cause a cache miss here?
annevk: we clearly don't want to key off the referrer, the image cache seems it keys on the policy
annevk
emilio: I don't know; consistency with images does seem ideal if attainable
emilio: but I'd be okay with trying to remove referrer policy as a key for all
emilio
annevk: right, my question is whether it makes sense to have the policy as part of the key to begin with
annevk: smells like follow-up material then, will keep the policy as the key for now and then probably remove both or something
emilio: note that removing will require changes to HTML, so yeah, follow-up imo (unless non-trivial to add)
Assignee | ||
Comment 1•5 years ago
•
|
||
It seems like this affects also the script loader and so on.
Comment 2•5 years ago
|
||
Past discussion on this in bug 1174921 (for images).
Comment 3•5 years ago
•
|
||
Thanks Timothy!
Note that https://html.spec.whatwg.org/#the-list-of-available-images does not take it into account at least. Searching for "cache" on https://w3c.github.io/webappsec-referrer-policy/ yields nothing.
Updated•5 years ago
|
Assignee | ||
Comment 5•5 years ago
|
||
For preload we're already effectively not using it, I think, due to
bug 1642325.
For images, this matches the spec, see earlier comments in this bug and
https://bugzilla.mozilla.org/show_bug.cgi?id=1174921#c17. I think it
makes sense for other sub-resources to align as well.
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
I feel a bit torn about these because they test real (if obscure) issues
with the speculative loader... But it's not clear to me it's worth it to
add plumbing to only check referrer policy if the load is speculative,
and our behavior matches other browsers1.
Assignee | ||
Comment 7•5 years ago
|
||
This test fails already on central if you change this line:
by:
Ci.nsIReferrerInfo.EMPTY
Because the previous part of the test populates the image cache. The
test wants to check that the channel for the image load is properly
flagged as private and thus that the http cache is partitioned
appropriately, thus clearing the image caches seems sane.
While at it, also fix it so that we send a valid image instead of base64
text, though that change is not technically needed so feel free to ask
me to remove it.
Comment 9•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/bd0e0254827d
https://hg.mozilla.org/mozilla-central/rev/d1ad1625fbaf
https://hg.mozilla.org/mozilla-central/rev/82d4df065e00
Description
•