Web API


Back to Tags

Don't use the unload event!

🗓️ July 14, 2019

The unload event that is available to us web developers isn’t consistent across browsers (but we already know that many things arent 😂). Really, if you want to have predictable behavior and need to fire off some event/code when a user leaves/closes your page, you should be listening to a page visbility change. Read more here