Spec exceeds the scope of network error logging.
MattMenke2 opened this issue · 2 comments
MattMenke2 commented
In section 3.1, there's the sentence: "If the user agent can service a request out of a local cache, that request MUST NOT result in a network request."
There are a couple issues here:
- "request" is not defined. I assume the spec should take this from the fetch standard in addition to "network request", but it does not.
- More concerningly is the "MUST NOT result in a network request" - this seems to imply the spec is incompatible with the stale-while-revalidate spec. I don't think the spec should be making claims about when a network request should or should not be made. That's really the job of the fetch spec. Also, more generally when a "network request" should or should not be made doesn't seem like it should be part of the spec - that should really be the job of the fetch spec, no? That avoids inconsistencies between the two specs.
- Also, section 3.1 claims "there MUST be separate network requests for each request in the redirect chain" - this certainly is not the case of how fetch works today, as some requests in a redirect chain might be cached, and some not. This again seems like it really should defer to the fetch spec.
- "A request MUST NOT result in a network request if the user agent is known to be offline (i.e., when navigator.onLine returns false)." - is this saying localhost requests should fail when navigator.onLine returns false? Again, this seems to be intruding on the fetch standard's territory. A browser can't even know if a given domain name is local or remote without doing DNS resolution first.
myakura commented
@MattMenke2 you might want to post the comment above to https://github.com/w3c/network-error-logging/ as this repository isn't W3C-affiliated (this repo just hosts Japanese translations of various Web platform specs).
MattMenke2 commented
Oops, thanks. Just googled for text taken from the formatted spec's HMTL, and this was the only other hit.