title: How to detect page is refreshed in vue.js
body: <p>I would like to detect when page is refreshed or reloaded in vue.js. I  have read the question from this post <a href="https://stackoverflow.com/questions/34443187/do-something-before-reload-or-close-in-vue-js">Do something before reload or close in vue.js</a>. It's using window.onbeforeunload. But the problem for me, where do I put this window function ? Could we use another default method from vuejs for detecting the page that is refreshed ?
  Thank you</p>