if (performance.navigation.type == 1) { alert( "This page is reloaded" ); }
…
The post js to detect if the page is refreshed (perform an action after each refresh) first appeared on Lenix Blog .
This article is reprinted from https://blog.p2hp.com/archives/8917
This site is for inclusion only, and the copyright belongs to the original author.