Difference between onunload and onbeforeunload (for synchronous ajax)
Difference between onunload and onbeforeunload (for synchronous ajax)
I perform a synchronous ajax request in my "onunload" handler. Is there any reason (browser performance, unload limitations, etc) that I should be using "onbeforeunload" instead? (I do not need to prevent the page from unloading.)