I have a Load button and I am calling onclick event on that button which would refresh the page using window.location.reload()
. But ,what I want is that the reload should only be called when the button is clicked for the first time . From the second click and till the HTML page is active the reload should not be called .
How can this be achieved with javascript ?Any examples would be helpful.