stop page reloads on button click code example
Example 1: reload pageon button click
<button type="button" onClick="window.location.reload();">Close</button>
Example 2: autoclick button if refresh page html
window.onload=function(){
document.getElementById("linkid").click();
};