Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

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.

Geändert am von Preetam Jakhmola

Alle Antworten (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