Revert "Ajax: remove "onunload" event handler"