prevent page load without isset code example
Example: prevent form submit on page refresh php\
//Using Javascript
<script>
if ( window.history.replaceState ) {
window.history.replaceState( null, null, window.location.href );
}
</script>