Skip to content

[HTTP] Replace X-Moz: Prefetch with Sec-Purpose: Prefetch #27171

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

Closed
9 of 10 tasks
Rumyra opened this issue Jun 6, 2023 · 1 comment
Closed
9 of 10 tasks

[HTTP] Replace X-Moz: Prefetch with Sec-Purpose: Prefetch #27171

Rumyra opened this issue Jun 6, 2023 · 1 comment
Assignees
Labels
Content:HTTP HTTP docs fx release archive A closed issue relating to firefox release notes for developers.

Comments

@Rumyra
Copy link
Collaborator

Rumyra commented Jun 6, 2023

Acceptance Criteria

  • The listed features are documented sufficiently on MDN
  • BCD is updated
  • Interactive example and data repos are updated if appropriate
  • The content has been reviewed as needed

For folks helping with Firefox related documentation

  • Set bugs to dev-doc-complete
  • Add entry to Firefox release notes if feature is enabled in release
  • Add entry to Firefox experimental features page if feature is not yet enabled in release

Related Gecko bugs

https://bugzilla.mozilla.org/show_bug.cgi?id=1836328

Other

  • Check content open issues to see if any pertain to the subject matter. If there are any that can be closed because of the work, do so. If there are any that can be fixed relatively quickly because of the knowledge from completing this issue and you have time, feel free to go ahead and fix them.
  • Check if glossary updates are required for the feature you're documenting - whether an existing term needs to be updated or a new term should be added.
  • Check if BCD update means that content pages need to have experimental markup removed or deprecated markup added (front matter tags and macros).
@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jun 6, 2023
@Rumyra Rumyra added Content:HTTP HTTP docs Firefox 115 and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Jun 6, 2023
@Rumyra Rumyra moved this from Backlog to Todo in MDN Web Docs Content Team Jun 6, 2023
@hamishwillee hamishwillee self-assigned this Jun 6, 2023
@hamishwillee
Copy link
Collaborator

hamishwillee commented Jun 19, 2023

This is part of a bigger job described in #23553 around harmonizing prefetch behaviour. The status is WIP while I work out what can be done now.

Useful resources/related issues

EDIT simple version:

  • prefetch has historically not been well standardized but this is part of the work to make it so.
  • Sec-Purpose: prefetch replaces X-mox: prefetch on FF115, and Purpose: prefetch on Chrome (sometime) , all of which tell the server this is a prefetch request
  • Sec-Fetch-Dest must be set to "" (empty). This maps to value of the as attribute in the Link definition. Chrome currently sets this value.
  • The Accept Header must include the same info as a navigation fetch. Currently Chrome does this but FF uses the "default" value
  • If the Accept header is always set as the same value then there is no need to set VARY header for the prefetch.
  • Prefetch obeys normal HTTP cache rules. Chrome currently does a wierd 5 minute wait where it doesn't validate the cache for prefetch records.
  • Must obey CORS, but very permissively. The prefetch can get any file, so if any file would succeed the CORS check then the request will succeed.

Anyway, all of that means that we're kind of "half way through" implementing the standard stuff on all browsers. I can explain where we want to go and where we are, but it is going to be messy. Still playing.

Status:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:HTTP HTTP docs fx release archive A closed issue relating to firefox release notes for developers.
Projects
Archived in project
Development

No branches or pull requests

3 participants