Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Learn More

window unload event issue

more options

I have made some async function call in window unload event, which works perfect for all browser but in Firefox it creates issue whenever the closing tab is last tab. It does not call the windows unload event. Technically each tab must work same. like works in chrome. Whenever we have multiple tabs it works well but however the last tab closes it does not work.

I have made some async function call in window unload event, which works perfect for all browser but in Firefox it creates issue whenever the closing tab is last tab. It does not call the windows unload event. Technically each tab must work same. like works in chrome. Whenever we have multiple tabs it works well but however the last tab closes it does not work.

Изменено Preetam Jakhmola

Все ответы (1)

more options

I think I remember this from another thread somewhere.

Can you use navigator.sendBeacon()? See:

I actually haven't tested whether that works on the last tab or not.


There is a bug on file related to the last tab. If I understand it correctly:

https://bugzilla.mozilla.org/show_bug.cgi?id=1532555

Before commenting, see: Bugzilla Etiquette