Skip to content

Factor out Deferred Fetch documentation, shows Baseline on Fetch API#43480

Closed
dfabulich wants to merge 1 commit intomdn:mainfrom
dfabulich:factor-out-deferred-fetch
Closed

Factor out Deferred Fetch documentation, shows Baseline on Fetch API#43480
dfabulich wants to merge 1 commit intomdn:mainfrom
dfabulich:factor-out-deferred-fetch

Conversation

@dfabulich
Copy link
Contributor

Description

Factor out Deferred Fetch documentation from the main "Fetch API" page.

Motivation

After this change, we now show a "Baseline: Widely Available" banner on the "Fetch API" page, and a "Baseline: Limited Availability" banner on the "Using Deferred Fetch" page.

Related issues and pull requests

Fixes #43479

@dfabulich dfabulich requested a review from a team as a code owner March 17, 2026 16:18
@dfabulich dfabulich requested review from pepelsbey and removed request for a team March 17, 2026 16:18
@github-actions github-actions bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Mar 17, 2026
@github-actions
Copy link
Contributor

@Josh-Cena
Copy link
Member

It was explicitly decided that fetchLater should be part of fetch because it's the same spec and reuses the same machinery: #42693 and #42606.

@dfabulich
Copy link
Contributor Author

My primary goal here is to put a big green "Baseline: Widely Available" banner on https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API.

There's kinda no reasonable way to show a banner on that page when it's documenting a mix of fetch and fetchLater.

Maybe the moral of this story is to just wait until fetchLater reaches baseline (a minimum of three years from now…?) but that feels like a counterintuitive conclusion.

Fetch API is hardly alone in having this issue.

@Josh-Cena
Copy link
Member

Josh-Cena commented Mar 17, 2026

But then we don't have a consistent editorial definition of what an "API" is. Currently our definition is more or less "one spec, one API"; the only exceptions I know are HTML and DOM which are split because of how big their scopes are, and some specs that are coalesced into a single API because of how unified their scopes are. Most specs can be extended, and it would be really awkward if each extension has to become its own API just for the sake of preserving the old API's baseline. After all, API groups don't have the concept of "baseline" anyway; only individual interfaces do.

@hamishwillee
Copy link
Collaborator

Thanks @dfabulich.

As @Josh-Cena says, we can't have these changes;

  • it's all one API, parts of which are broadly supported and parts that are not.
  • Using Deferred Fetch is a guide page. Guide pages don't have those API overview sections. They should not, but sometimes do have browser-compat.

The intent is great, but baseline needs to change to fit the docs, not the docs to the baseline.

It would be good is to create an issue in https://github.com/mdn/fred/issues to note that

  • if a page has more than one browser compat entry then the compatibility is not shown. I'd argue that it would be useful to be able to note that parts of an API are very stable and parts are not.
  • there are pages that might benefit from the banner, such as Using Deferred Fetch, but that should not have browser-compat. It may be they will say "add the compat key but omit the spec and compat sections", or they might say "it isn't an overview for an API so it doesn't get the banner".

Closing this though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Fetch API" has no Baseline banner, because it also documents fetchLater

4 participants