Open prioux opened 3 months ago
You can try the javascript code in the JS console in your browser.
Not sure I understand. Anyways, the split works as intended, executing JS command in the console seems to delete get-query from the chromes url line. Yet using the back button I can go to the old query-polluted url. On the other hand, history.replaceState({}, "", location.href.split("?")[0]);
erases query entirely
Not sure which pages and filters and options are ok, and which should be stripped
one place for links with query params - small/large button/list project view (both NeuroHub and Cbrain). Not sure is this the one meant here, but can delete from history
Some links in CBRAIN send the user to a page with filters and options applied instantaneously through the use of URL query parameters; when these users move back and forth in their history, these filtering parameters take effect again, confusingly replacing whatever new filters the user has applied since then.
The solution is that whenever a page is rendered with such query params, the page should run at the end this type of javascript to edit the browser's history:
We have to be careful not to do that everywhere, there are other pages where query params are OK and need to be preserved.