-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Closed as not planned
Description
Description
Hello,
When I run a speed test for my site, I see among the test results this warning of type "Avoid unload event listeners".
The warning : The unload event does not fire reliably and listening for it can prevent browser optimizations like the Back-Forward Cache. Use pagehide or visibilitychange events instead.
On checking, I found that the warning comes from my jQuery file version v3.6.0 or version v3.7.1. The source of the warning is https://github.com/jquery/jquery/blob/main/src/event.js#L125
Note: https://web.dev/bfcache/?utm_source=devtools#never-use-the-unload-event
Metadata
Metadata
Assignees
Labels
No labels