Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to optionally configure the events used for detecting and handling when page unload and flushing occurs #1683

Closed
MSNev opened this issue Oct 5, 2021 · 1 comment

Comments

@MSNev
Copy link
Collaborator

MSNev commented Oct 5, 2021

Some users have specific requirements to minimize the amount of time required to process requests during page navigation.

When the SDK hooks the 'beforeunload' event this can cause Chromium based browsers to delay (around 30ms) the start of the page navigation when the user starts typing in the browsers URL.

The enhancement is to add support to allow the fine tuning of which events should be excluded (if possible) from the page unload (auto flushing) process. The SDK must ensure that it hooks at least one of the required events even if required based on the runtime environment

Configuration Proposal

disablePageUnloadEvents?: string[];
[Optional] An array of the page unload events that you would like to be ignored, special note there must be at least one valid unload event hooked, if you list all or the runtime environment only supports a listed "disabled" event it will still be hooked, if required by the SDK.
Unload events include "beforeunload", "unload", "visibilitychange" (with 'hidden' state) and "pagehide"

disablePageShowEvents?: string[];
[Optional] An array of page show events that you would like to be ignored, special note there must be at lease one valid show event hooked, if you list all or the runtime environment only supports a listed (disabled) event it will STILL be hooked, if required by the SDK.
Page Show events include "pageshow" and "visibilitychange" (with 'visible' state)

@MSNev MSNev added this to the 2.x.x (Future Release) milestone Oct 5, 2021
@MSNev MSNev self-assigned this Oct 5, 2021
MSNev added a commit that referenced this issue Oct 5, 2021
… handling when page unload and flushing occurs #1683
MSNev added a commit that referenced this issue Oct 7, 2021
… handling when page unload and flushing occurs #1683 (#1684)
@MSNev MSNev added the fixed - waiting release PR Committed and waiting deployment label Oct 7, 2021
@MSNev MSNev closed this as completed Nov 10, 2021
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant