Warning upon exiting page without saving content


We've had many complaints as users lose content (yeah...) because browsing back and forward for example.
Just like FB...(yeah...) they expect a warning if exiting a page/editor without saving, like "Are you sure you want to leave this page?" Buttons: "Keep editing" "Yes leave this page, I understand unsaved content will be lost"

Any plugin out here for this? Wouldn't it be useful into core?