-
Notifications
You must be signed in to change notification settings - Fork 35
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
Keying on Vary:ing headers in prefetch/prerender #170
Comments
Agreed that this can be tricky incl in the presence of redirects. If it isn't already, maybe the logic that computes the referrer could be factored out so that it can be reused to do check Or do we want to consider |
I was hoping to consider So indeed, maybe we can just do the referrer calculation, conditional on I admit not having thought much about redirects. |
Some minor updates:
|
Another good use case for |
Interesting. I'd have hoped/assumed that light/dark mode adaptation would be almost exclusively done client-side, with media queries (CSS, |
Spinning off of #18, but more general:
We currently key prefetches and prerenders on
(referrer policy, URL)
in the spec. (Prefetches might also key on sandbox flags present? Can't really tell if that's a key in the same sense...)#18 discusses removing the referrer policy key.
However we should probably also key on any headers that appear in the
Vary
response header.This is a bit tricky as it will involve essentially doing the header computation both at original prefetch/prerender time, and at activation time. The fetch spec isn't well layered to allow this, as it assembles all the headers during the main fetch algorithm. (Maybe we could hack it with an only-if-cached fetch?? But that's only for same-origin, and wouldn't really match implementations anyway...) But it seems like the right thing to do.
The text was updated successfully, but these errors were encountered: