Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test out fetch-with-keepalive on plausible.io (#5005)
* Test out fetch-with-keepalive on plausible.io Fetch with keepalive is a [widely-supported](https://developer.mozilla.org/en-US/docs/Web/API/Request/keepalive) which indicates whether the browser will keep the associated request alive if the page that initiated it is unloaded before the request is complete. We're hoping it will improve event capture rates for `pageleave` and `pageview` events when the user closes the tab To use it, we also need to start using `fetch` (with fallback to xhr). For extra safety, we will only deploy this on `plausible.io` initially. This will ensure that if there are issues we will be able to react without affecting any other customers. TODO after this PR: - [ ] Companion docs PR - [ ] Purge bunny cache - [ ] Make fetch the default request method without data-property * Mark some code conditional
- Loading branch information