Silently replacing a URL
See original GitHub issueWhen calling Router.replace()
, I’d like to update the URL without reloading the page (or call getInitialProps
again).
When rendering on the server, we’re sometime fetching defaults parameters. Once the page reach the browser, we’d like to update the query to match the default parameters that were selected in order to ensure reloading/sharing the page will use the same parameters.
Allowing silent url change would allow us to skip server-side redirect to the final URL improving load time.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Silently update url without triggering route in vue-router
The solution here is to use an alias so Vue router treats multiple urls as the same route. This question is not about...
Read more >How do I use JavaScript to modify the URL without reloading ...
Learn all of the options JavaScript provides for modifying the URL of the current page in the browser without reloading the page.
Read more >Silently Update URL in Nuxt 3 | Cody Bontecou
Update your URL using vue-router within Nuxt 3 so that your page does not refresh on variable change.
Read more >Silent install Azure Active Directory Application Proxy connector
Covers how to perform an unattended installation of Azure Active Directory Application Proxy Connector to provide secure remote access to ...
Read more >Silent Installation Properties for Horizon Agent - VMware Docs
You can include specific properties when you silently install Horizon ... See "Configuring URL Content Redirection in the Configuring Remote ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
But shallow routing still calls render method on the page. And the second problem, that shallow routing is restricted only to the same page. My problem is, I need to do only something like “history.pushState({}, “page 2”, “mypath”);” - i want to stay on the same page (without rerendering, because it is to expensive), and solution with “history.push” is not so clean. Any other ideas?
@SBoudrias Hi, i found a workaround. I don’t know what cause my original problem, but i find a solution that may help us to further investigations. Maybe i was wrong a whole time and this is the actually behavior that we expect.
So, the child component, call now for example <Foo> isn’t a root level component, so the <Foo> not in the pages. It just wrapped a HOC, withRouter. Also in the <Home> component is wrapped the withData HOC from apollo example. The <Home> has a url property by default from the server, and when somewhere in the hierarchy, i call the Router.push(…, …, { shallow: true }), actually nothing else, but the Home component updating. This led me to workaround, i have to propagate the query parameter from <Home> to <Foo> and now the thing is working as i expect, but the solution is not 100% for me.
So, this is the expected behavior or its some strange issue with next?