Solution 1 :

Just use window.location.reload().

  <button @click="reloadPage">Reload</button>

export default {
  methods: {
    reloadPage() {

Problem :

I want to reload a webpage just once everytime after pressing a button on the webpage. I have written my code in Vue.js. How do I achieve this?

Note: I do not want to auto-refresh after specific interval of time. Instead just once after everytime that button on the webpage is clicked.

I would appreciate any help given.
Thank you.


Leave a Reply

Your email address will not be published. Required fields are marked *