Re: [w3ctag/design-reviews] Early Design Review: Pending Beacon API (Issue #776)

> About the use of Get/PostPendingBeacon, why not using the method in a dictionary instead of having two instances?

The proposal to have two different classes `PendingGetBeacon` & `PendingPostBeacon` is to help enforcing type safety. There was an explanation https://github.com/WICG/pending-beacon/issues/59#issuecomment-1325977557.

> How about ensuring that a PostPB isn't sent twice (like if there is a crash).

A browser should ensure that a queued PendingBeacon can only be sent once. At the time of crashing, browser should know that whether a given PendingBeacon is sent or not. But it cannot guarantee the "send" action succeed. => This behavior needs to be addressed by maybe a [retry mechanism](https://github.com/WICG/pending-beacon/issues/40).

> Issues about crash recovery, should it be done after a network and/or location change, as it can have privacy implications? after a time limit?

Crash recovery is still under discussion. But we think that network status after a crash does not matter, as developers can already achieve similar effect using local DB, e.g. storing data manually and recover from indexDB after a crash.

> Do having a pending beacon registered impact how bfcache work?
Nope. One of the goals of this proposal is to provide a reliable API that developers can use along with bfcache.

> What is the point of forcing a PendingBeacon to be sent, if it is supposed to be sent at the end of the interaction, why not using fetch or a normal beacon in that case?
> Why existing mechanism is not reliable and how this new proposed mechnisam solve the not reliable issue? 

Please see this section discussing about an alternative approach [Extending Fetch API](https://github.com/WICG/pending-beacon/issues/40) and [this comment](https://github.com/WICG/pending-beacon/issues/52#issuecomment-1293152655) arguing that the goal of this proposal is beyond the scope of fetch() API.

> Should the HTML unload event be fixed instead? Could this be solved at the Page Lifecycle level instead of having a new specification?

We don't think so. [This section](https://github.com/WICG/pending-beacon#problem-and-motivation) from the explainer describes that the page lifecycle events are not sufficient.


Please let us know if you have any other questions. Thanks for your time!

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/776#issuecomment-1433302630
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/776/1433302630@github.com>

Received on Thursday, 16 February 2023 15:49:38 UTC