js disable ask before reload page code example
Example: brwoser prompt before reload
window.onbeforeunload = function(){ return 'Do you want to reload the page?';}
window.onbeforeunload = function(){ return 'Do you want to reload the page?';}