Safari asks for your confirmation if you accidentally try to close a page if you filled a form but never submitted. This saved my day more than once and it’s undoubtedly helpful.
The problem is that if you’re sending the form via ajax Safari still thinks you’re loosing some data. Luckily the fix is easy:
var postBody = document.querySelector('textarea.post-body') postBody.defaultValue = postBody.value