Reactivate onbeforeunload - attachments have to be loaded into another
browser window otherwise long-poll request is killed.