When you reload the page, your JS application is initialized again and restarted, so you cannot receive a callback.
However, what you can do is add the hash to the URL before reloading.
window.location = window.location.href + "#refresh"; window.location.reload();
Then, when loading the page, check if a hash fragment exists. If this happens, you will know that you have just refreshed the page.
source share