Registers an unload listener - polyfills.js -> 1747

Hi,
Anyone faced the issue “Registers an unload listener - polyfills.js” after test with Lighthouse?

Registers an unload listener

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.

URL
polyfills.js:1747

Thanks in advanced

1 Like

Possibly see stackoverflow post: https://stackoverflow.com/questions/64773392/registers-an-unload-listener-after-run-lighthouse-with-angular-application/65819829#65819829

I have also answered in that forum.

Make sure to test with the lighthouse in a production deployment. I believe that Angular may be adding extra event listeners that don’t end up in the production build, to help with local debugging/ live reloading etc.