Silently update url without triggering route in vue-router
Without reloading the page or refreshing the DOM, history.pushState can do the job. For example: add this method in your component or elsewhere to do that: addHashToLocation(params) { history.pushState( {}, null, this.$route.path + ‘#’ + encodeURIComponent(params) ) } Then anywhere in your component you can call addHashToLocation(‘/my/new/path’) to push query params to the window.history stack. … Read more