Content: Why MDN says Beacon API is experimental?

Created on 23 Feb 2021  Â·  5Comments  Â·  Source: mdn/content

Hi there, I had a discussion with my team arguing whether we should or should not use sendBeacon, and one of my teammates sent this link that says that the API is experimental https://developer.mozilla.org/en-us/docs/Web/API/Beacon_API/Using_the_Beacon_API

But it doesn't say that in the repo https://github.com/mdn/content/blob/main/files/en-us/web/api/beacon_api/using_the_beacon_api/index.html

What's the problem here?

WebAPI

Most helpful comment

Thanks, that's a really interesting thread. But I don't think it's connected to this issue.

{{SeeCompatTable}} asks people to look at the compat for the item: although the link the macro adds is broken (because that page doesn't contain a table) the compat for the API looks pretty good.

https://github.com/mdn/content/issues/1521 argues that the concrete guidance given in the documentation (most specifically, about using onunload) is wrong. @sideshowbarker made some improvements to the Navigator.sendBeacon() article, but Using the Beacon API and the Beacon API overview page both still reference onunload.

So we should IMO remove {{SeeCompatTable}}, but also update these docs in https://github.com/mdn/content/issues/1521. @sideshowbarker , I'm happy to have a go at distilling the comments in that thread, if you like.

All 5 comments

It's because the page includes the {{SeeCompatTable}} macro. I think we should just remove that macro call.

For experimental-ness, it's usually better to check the compat table, which will give you more detail and be more likely to be up to date: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon#browser_compatibility.

Perhaps related to #1521

Thanks, that's a really interesting thread. But I don't think it's connected to this issue.

{{SeeCompatTable}} asks people to look at the compat for the item: although the link the macro adds is broken (because that page doesn't contain a table) the compat for the API looks pretty good.

https://github.com/mdn/content/issues/1521 argues that the concrete guidance given in the documentation (most specifically, about using onunload) is wrong. @sideshowbarker made some improvements to the Navigator.sendBeacon() article, but Using the Beacon API and the Beacon API overview page both still reference onunload.

So we should IMO remove {{SeeCompatTable}}, but also update these docs in https://github.com/mdn/content/issues/1521. @sideshowbarker , I'm happy to have a go at distilling the comments in that thread, if you like.

@sideshowbarker , I'm happy to have a go at distilling the comments in that thread, if you like.

Yes please — that’d be great

I just merged https://github.com/mdn/content/pull/2866 which removes the {{SeeCompatTable}}, as well as addressing https://github.com/mdn/content/issues/1521, so I think we can close this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sanoodles picture sanoodles  Â·  3Comments

Elchi3 picture Elchi3  Â·  4Comments

yukulele picture yukulele  Â·  4Comments

Elchi3 picture Elchi3  Â·  4Comments

0xdevalias picture 0xdevalias  Â·  3Comments