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

Lighthouse audit fails with no-unload-listeners #170

Open
alanayoub opened this issue Jan 18, 2023 · 0 comments
Open

Lighthouse audit fails with no-unload-listeners #170

alanayoub opened this issue Jan 18, 2023 · 0 comments

Comments

@alanayoub
Copy link

Is your feature request related to a problem? Please describe.
Lighthouse errors due to no-unload-listeners.

Describe the solution you'd like
Based off of https://web.dev/bfcache/#never-use-the-unload-event, pagehide event is the recommended event since it's triggered in all cases where unload is triggered.

Additional context

Never add an unload event listener! Use the pagehide event instead. Adding an unload event listener will make your site slower in Firefox, and the code won't even run most of the time in Chrome and Safari.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant