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

[BUG] Fire unload event #1948

Closed
Lulubul opened this issue Nov 21, 2022 · 3 comments
Closed

[BUG] Fire unload event #1948

Lulubul opened this issue Nov 21, 2022 · 3 comments

Comments

@Lulubul
Copy link

Lulubul commented Nov 21, 2022

Description/Screenshot
I tried to migrate from 2.5.11 to 2.8.9 version for @microsoft/applicationinsights-web and i receive a new error in lighthouse.

The unload event does not fire reliably and listening for it can prevent browser optimizations like the Back-Forward Cache. Consider using the pagehide or visibilitychange events instead.

https://developer.chrome.com/blog/page-lifecycle-api/#the-unload-event

image

Steps to Reproduce
Migrate from @microsoft/applicationinsights-web 2.5.11 to 2.8.9 version and run lighthouse.

  • OS/Browser: Edge
  • SDK Version [e.g. 22]: 2.8.9
  • How you initialized the SDK: npm install

Expected behavior
The unload event should not be fired since is a issue in some browser https://developer.chrome.com/blog/page-lifecycle-api/#the-unload-event
Additional context
I'm not sure if in version 3 this is fixed but since this is beta new need a stable version.

@Lulubul Lulubul changed the title [BUG] [BUG] Fire unload event Nov 21, 2022
@Karlie-777 Karlie-777 added the investigating Investigating the issue label Nov 22, 2022
@Karlie-777
Copy link
Contributor

@Lulubul extra configurations are provided to customize unload events, see details here please let us know if this resolve the issue.

@Karlie-777 Karlie-777 removed the investigating Investigating the issue label Nov 22, 2022
@Lulubul
Copy link
Author

Lulubul commented Jan 4, 2023

It worked thank you very much.

@Lulubul Lulubul closed this as completed Jan 4, 2023
Copy link

github-actions bot commented Jan 5, 2024

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 Jan 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants