Re:Why IndexedDB is slow and what to use instead
by shubik22 on Tuesday November 23, 2021 @09:20AM
(#29318092)
This has been my experience as well. At a prior job, we experimented with deferring reporting/tracking functions until the browser was idle, and then firing the remaining tracking events on unload and found that a non-trivial number of events were just dropped (I believe due to this issue).
Re:Why IndexedDB is slow and what to use instead
by littlestymaar on Tuesday November 23, 2021 @09:45AM
(#29318354)
Funny, because that was almost exactly my use-case as well. I guess sending network requests during the onload event doesn't work well, but maybe for local things it works better, who knows.
On the contrary, I've found onbeforeunload far from reliable (albeit my use-case was a bit different). You should probably not rely on it for anything important.