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

Issue #181 - Redefine network request in terms of Fetch #182

Open
wants to merge 5 commits into
base: gh-pages
Choose a base branch
from

Conversation

miketaylr
Copy link
Member

@miketaylr miketaylr commented Feb 6, 2025

This is Part 1 of N commits to address #166.

It largely just links to existing Fetch concepts.


Preview | Diff

index.html Outdated
If the user agent follows [=redirect status|redirects=] as part of a [=navigate|navigation=],
there MUST be separate <a>network requests</a> for each <a>request</a> in
the redirect chain.
If the user agent follows [=redirect status|redirects=] as part of a
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTP-network fetch will be called multiple times if we're following redirects (either in Fetch, or manually in HTML).

However, this also brings up an inconsistency with the previous paragraph -- in the case of redirects, some requests could be served from cache, while others go to network. This paragraph says that each request must result in a [=network request=], while the previous one says that the cache-served requests must not result in a [=network request=]. (I think that basing the wording on HTTP-network fetch clears that up, too.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what you're suggesting is to delete these two paragraphs, because (HTTP-network) fetch solves that for us. Correct?

@miketaylr miketaylr marked this pull request as ready for review February 7, 2025 22:55
@miketaylr miketaylr requested a review from clelland February 7, 2025 22:56
@miketaylr
Copy link
Member Author

PTAL @clelland

index.html Outdated
If the user agent follows [=redirect status|redirects=] as part of a [=navigate|navigation=],
there MUST be separate <a>network requests</a> for each <a>request</a> in
the redirect chain.
If the user agent follows [=redirect status|redirects=] as part of a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTP-network fetch will be called multiple times if we're following redirects (either in Fetch, or manually in HTML).

However, this also brings up an inconsistency with the previous paragraph -- in the case of redirects, some requests could be served from cache, while others go to network. This paragraph says that each request must result in a [=network request=], while the previous one says that the cache-served requests must not result in a [=network request=]. (I think that basing the wording on HTTP-network fetch clears that up, too.)

@miketaylr
Copy link
Member Author

I want to call out #182 (comment) - I thought I left a comment, but I can't find it in the GitHub UI:

I think you're suggesting that HTTP-network fetch handles both of 1) not doing a "network request" from the cache, and 2) not referencing redirects explicitly, because HTTP-network fetch handles that, and prevents serving a redirect response from cache (thus, resulting in a "network request"). Is that correct? Or did I miss the point?

@miketaylr
Copy link
Member Author

Couldn't find "HTTP-network fetch"

Guess it's not exported yet. 🤷

@miketaylr miketaylr requested a review from clelland February 17, 2025 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants