-
Notifications
You must be signed in to change notification settings - Fork 22.6k
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
Update prefetch
link once the spec and implementations are finalized
#23553
Comments
FYI, FF supports @noamr It would be good to have help writing a vendor neutral version of https://developer.mozilla.org/en-US/docs/Glossary/Prefetch if you have advice. I also found this doc, which I think should be deleted: https://developer.mozilla.org/en-US/docs/Web/HTTP/Link_prefetching_FAQ |
Amazing.
Yes it would be great! I suggest starting with the spec, and ask if anything is missing/needs clarifying?
|
@noamr Thanks. I also found your comment here useful https://bugzilla.mozilla.org/show_bug.cgi?id=1788167 as that seems to summarize where browsers/servers should end up. |
Yes, though "When consuming prefetch, Vary: Accept should be ignored" is unnecessary if the accept header is the same as navigation. That's what we ended up doing in chrome and WPT (Send the same accept header as nav, but don't treat it in a special way when invalidating cache) |
@noamr Can you confirm my understanding of the CORS-mode behaviour - specifically what does this mean?:
Looking at the spec https://w3c.github.io/webappsec-csp/#does-request-violate-policy ... Given a request request and a policy policy, this algorithm returns the default directive if the resource-hint request violates all the policies, and "Does Not Violate" otherwise. So in other words you run the test against all the policies and only fail if all of them fail. Is that right? Further, that means if default-src is not specified (everything is allowed) you will succeed. And if default-src is permissive, the fact that others are not does not matter. And presumably same-site requests just work? |
Also,
I'm probably asking a stupid question here sorry, but what are the rules for "as", and are there special rules for document/cross-site and so on. |
Yes. The idea is that your prefetch could be any type of resource. So if any type of resource is allowed to be fetched from this URL, you can also prefetch this URL.
Correct.
No, you can also prevent same-site in CSP. |
It does in
The |
Wow, thanks for the prompt response 😄 |
@noamr ... and thanks for all your support on getting the fixes in. |
MDN URL
https://developer.mozilla.org/en-US/docs/Glossary/Prefetch
What specific section or headline is this issue about?
No response
What information was incorrect, unhelpful, or incomplete?
The current text accurate-ish to the current Firefox implementation, but that's about to change:
Sec-Purpose
instead ofPurpose
orx-moz
Accept
header is the same as the one for regular address-bar browsingprefetch-src
What did you expect to see?
I expect the page to reflect how prefetch works in an interoperable way (once reality catches up with that...)
Do you have any supporting links, references, or citations?
See HTML PR: whatwg/html#8111
Do you have anything more you want to share?
No response
The text was updated successfully, but these errors were encountered: