title: How to detect page is refreshed on vue?
body: <p>I try like this :</p>
  
  <pre><code>created() {
        window.addEventListener('beforeunload', function(event) {
           event.returnValue = 'Write something'
           this.$router.push('/')
        })
      },
  </code></pre>
  
  <p>the message like this :</p>
  
  <p><a href="https://i.stack.imgur.com/q48U2.png" rel="noreferrer"><img src="https://i.stack.imgur.com/q48U2.png" alt="enter image description here"></a></p>
  
  <p>If I click cancel, it will cancel</p>
  
  <p>If i click reload, it will reload the page. it reload to detail page</p>
  
  <p>I want when the user clicks the reload button it will reload the page. but reloads the page to the home page</p>
  
  <p>how can i do it?</p>
  
  <p><strong>Update</strong> :</p>
  
  <p>My router like this :</p>
  
  <pre><code>import Vue from 'vue'
  import Router from 'vue-router'
  import Home from './views/Home.vue'
  ...
  
  Vue.use(Router)
  
  export default new Router({
    mode: 'history',
    base: process.env.BASE_URL,
    routes: [
      {
        path: '/',
        name: 'home',
        component: Home
      },
      ...
    ]
  })
  </code></pre>
  
  <p>My environment : dev</p>
  
  <p>My project is using vuetify</p>