Here is a handy piece of JavaScript code that will remind your users to save the changes before leaving your page.

function showADialog(e){
var confirmationMessage = 'Save Profile Changes';
//some of the older browsers require you to set the return value of the event
(e || window.event).returnValue = confirmationMessage; // Gecko and Trident
return confirmationMessage; // Gecko and WebKit
}
function SaveReminder(e) {
console.log(window.location.href);
return showADialog(e);
}
window.addEventListener("beforeunload", SaveReminder);