Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Learn More

Deze conversatie is gearchiveerd. Stel een nieuwe vraag als u hulp nodig hebt.

window.onbeforeunload not functioning if restore previous session is enabled

  • 1 antwoord
  • 1 heeft dit probleem
  • 6 weergaven
  • Laatste antwoord van cor-el

more options

I have application script that uses window.onbeforeunload to perform a certain function when the window or tab is closed. This works fine in firefox (and other browsers), but won't work if the restore previous session browser setting is enabled. Any help is appreciated.

I have application script that uses window.onbeforeunload to perform a certain function when the window or tab is closed. This works fine in firefox (and other browsers), but won't work if the restore previous session browser setting is enabled. Any help is appreciated.

Alle antwoorden (1)

more options

If you use Restore Previous Session then you aren't leaving the page if you close Firefox because you can resume the next time you open Firefox and you aren't suffering data loss unless the page uses complicated JavaScript that might not make it possible to restore the page. So that might be causing window.onbeforeunload not functioning as expected by you. I don't know whether this is intentionally.