w3ctag / design-reviews

W3C specs and API reviews
Creative Commons Zero v1.0 Universal
328 stars 55 forks source link

Specification Review: FetchLater API #887

Closed mingyc closed 11 months ago

mingyc commented 1 year ago

こんにちは TAG-さん!

I'm requesting a TAG review of Fetchlater API.

This is a proposal for FetchLater API. It is a system for sending beacons when pages are discarded, that uses a stateful API rather than having developers explicitly send beacons themselves.

Further details:

You should also know that...

[please tell us anything you think is relevant to this review]

We'd prefer the TAG provide feedback as (please delete all but the desired option):

🐛 open issues in our GitHub repo for each point of feedback

☂️ open a single issue in our GitHub repo for the entire review

💬 leave review feedback as a comment in this issue and @-notify @mingyc, @fergald, @noamr

cynthia commented 1 year ago

Discussed during plenary this week. API seems fine, but the naming is a bit strange, "fetch later" could be misunderstood as a deferred fetch, when what you are getting is a guaranteed fetch when the document is gone. We don't have any better suggestions, but just wanted to point out the possibility of misunderstanding.

Explainer could use a bit more spelling out what the user story is. I have some speculations on how this could be used, but that's wildly speculative. Could you add some problems this proposal solves?

mingyc commented 1 year ago
"fetch later" could be misunderstood as a deferred fetch

The current PR (https://github.com/whatwg/fetch/pull/1647) actually calls the algorithm deferred fetching, I think it's intentional.

@noamr FYI

Explainer could use a bit more spelling out what the user story is. I have some speculations on how this could be used, but that's wildly speculative. Could you add some problems this proposal solves?

My bad that the linked explainer does not point to the entry explainer describing the overall goal. Please let me know if the problem description there is clear or not.

Also, I will try to include more story into the fetch later explainer.

noamr commented 1 year ago

Discussed during plenary this week. API seems fine, but the naming is a bit strange, "fetch later" could be misunderstood as a deferred fetch, when what you are getting is a guaranteed fetch when the document is gone. We don't have any better suggestions, but just wanted to point out the possibility of misunderstanding.

I don't really understand this comment. The fetch is deferred to when the document is gone/deactivated. It's called now, and processed at a later time.

cynthia commented 1 year ago

I don't really understand this comment. The fetch is deferred to when the document is gone/deactivated. It's called now, and processed at a later time.

To clarify the sentiment on the naming - it was about the ambiguity of "later" (which can be any time between now and whenever) when it's actually at the point of document destruct (which is much more narrow window than "between now and whenever").

noamr commented 1 year ago

I don't really understand this comment. The fetch is deferred to when the document is gone/deactivated. It's called now, and processed at a later time.

To clarify the sentiment on the naming - it was about the ambiguity of "later" (which can be any time between now and whenever) when it's actually at the point of document destruct (which is much more narrow window than "between now and whenever").

It's actually "any time between now and document destruct or the given timeout, as late as possible". I think "later" conveys this.

cynthia commented 11 months ago

It's actually "any time between now and document destruct or the given timeout, as late as possible". I think "later" conveys this.

Understood. Happy to move this forward in that case, thanks!