Reputation: 9668
I have a link to reload the page with JS:
<a href="#" onclick="location.reload()">Reload</a>
How do I stop page reload after the location.reload() method has been called?
Upvotes: 2
Views: 19044
Reputation: 11313
You can use the following code:
window.stop();
Beware: Microsoft Internet Explorer and Edge don't support it.
Upvotes: 4