티스토리 수익 글 보기
Barry Pollard’s Post
The `unload` event no longer fires in Chrome by default! Since the advent of the mobile web this has become increasingly unreliable and we think that’s a footgun for devs who might think it works, when it often won’t. We’ve spent the last 3 years carefully removing it from Chrome. https://lnkd.in/d-2eDe8x People do not open a page to read/interact with, and then close it cleanly. The modern web is much more complex with pages backgrounded, often silently killed in the background (by the OS AND by users) or navigated away from before restoring by the bfcache by going back. Unload did not fire for any of those situations. When a tab is hidden (and visibilitychange happens) you should take that as the last opportunity to reliably fire events (save state, fire analytics…etc) rather than assume unload will fire late (it often doesn’t). APIs like fetchLater also help here. Let me know if you’ve any questions!
Yes!! It finally happened! Thanks so much for the relentless effort to get rid of it.
I have probably no less than 70 Chrome tabs open at any moment.
My ex is seriously cyber talking me and he’s acting as a developer, but using my name, he compromised my whole Chrome browser, that’s okay he’s going to go to prison one day
The onINP fix you merged yesterday was the same problem. It waited for an idle callback, so a page hidden before that ran never reported its INP. The hide was the last moment it could count on.