You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The unload event is used to unsubscribe the connection.
Chrome lighthouse audit say the unload event is a bad practice and prevent Back/forward cache
A browser optimization that enables instant back and forward navigation. It significantly improves the browsing experience for users—especially those with slower networks or devices.
Would it not be better to unsubscribe on beforenuload event instead?
beforenuload still prevent back/forward cache on Firefox, but not on Chrome.
I don't know if there would be any other implications.
The text was updated successfully, but these errors were encountered:
The unload event will be gradually deprecated starting from Chrome 117. The deprecation will occur by gradually changing the default so that unload handlers stop firing on pages unless a page explicitly opts in to re-enable them.
SuperPat45
changed the title
Unsubscribe on beforeunload instead on unload fore Back/forward cache compatibility
Unsubscribe on beforeunload instead on unload has Chrome will stop firing unload events
Aug 19, 2023
The unload event is used to unsubscribe the connection.
Chrome lighthouse audit say the unload event is a bad practice and prevent Back/forward cache
Would it not be better to unsubscribe on beforenuload event instead?
beforenuload still prevent back/forward cache on Firefox, but not on Chrome.
I don't know if there would be any other implications.
The text was updated successfully, but these errors were encountered: