Reputation: 649
I'm replacing window.location with params here :
window.location.replace('/results/#'+ params);
but this won't reload the page with new params, Im also trying to reload the page after :
window.location.pathname === '/results/' && window.location.reload();
but this will reload the page with old parms
Upvotes: 0
Views: 84
Reputation: 190947
The #
hash won't cause a page reload since it represents a fragment of the current page. You can listen to onhashchange
and do something at that time.
Upvotes: 1