unload method fails in IE

unload method fails in IE

I have created a small page that gives info about the unload method and Microsoft's onbeforeunlaod property... it is located here:


The support for unload() in Firefox, Chrome and Safari is almost 100%.
Opera doesn't seem to like scripts being executed on unload at all...

The main issue here is that unlaod() is badly supported in IE8.

Only reloading the page and closing the browser window causes unload() to execute. The other reasons (which are far more important) - using the address-bar, using the back/forward buttons, clicking on links - do not cause unload() to execute.
But the function referenced by onbeforeunload gets executed in all those cases!

This means that, all the jQuery developers had to do is, for IE browsers, bind the unload() callback function to onbeforeunlaod, but for some reason they did not do that.
Why?


--
Šime Vidas
http://www.w3viewer.com