For posterity, here is what I did:
if ($.browser.msie) { window.onbeforeunload = function() { $('#div1').append("<img src='record_call' />"); } else { $(window).unload( if ($.browser.webkit) { $.ajax(url:record_call, async:false); } else { $('#div1').append("<script src='record_call' />"); } ); }
I found that IE is working on adding img, but not a script, perhaps because the script is more resource intensive and it shuts down before trying to load it. For webkit, a script application sometimes works, but adding an image never worked. Finally, I default to a script (mainly for FF), because older versions of browsers seem to blend well with it. IE blocks the AJAX call used by webkit due to xss.
In addition, IE never works with the jquery unload function, and other browsers do not work with onbeforeunload, so you need to examine them. This, of course, is not a good solution, but it works most of the time.
Agmin source share