Remove parameters on the URL after they were handled

How do I remove parameters on the URL after they were handled ?
Navigator - navigateTo passes the params to the next view.

Why I need it ?
When a user forget his password, he gets a token to his email. once clicked I check the token and let the user change his password. if the user refresh the page he gets a meessage that the token was already used - I would call it a bug…

Just navigate to pervious url (or the url without this parameter) after handled.

If you ever wrote Emberjs. You should realized url is a very good place to hold application state. Emberjs can sync app state and url automaticly(bidirection). Vaadin as I known so far just implement one direction way.

It doesn’t work. Navigate to a different url passes the parameters as well

Why? That’s what navigator disign for!

Please paster your code. Below is mine:

    @SuppressWarnings("unchecked")
    @Subscribe
    public void dynMenuClicked(DynMenuClickEvent dce) {
        Collection<SingleInstallation> selected;
        switch (dce.getBtnId()) {
        case CommonMenuItemIds.DELETE:
            selected = (Collection<SingleInstallation>) table.getValue();
            selected.forEach(b -> {
                if (b.isArchived()) {
                    repository.delete(b);
                } else {
                    b.setArchived(true);
                    repository.save(b);
                }
            });
            ((SingleInstallationContainer)table.getContainerDataSource()).refresh();
            break;
        case CommonMenuItemIds.REFRESH:
            ((SingleInstallationContainer)table.getContainerDataSource()).refresh();
            break;
        case CommonMenuItemIds.EDIT:
            selected = (Collection<SingleInstallation>) table.getValue();
            UI.getCurrent().getNavigator().navigateTo(VIEW_NAME + "/edit/" + selected.iterator().next().getId() + "?pv=" + lvfb.toNavigateString());
            break;
        case CommonMenuItemIds.ADD:
            UI.getCurrent().getNavigator().navigateTo(VIEW_NAME + "/edit/?boxid=" + box.getId() + "&pv=" + lvfb.toNavigateString());
            break;
        default:
            LOGGER.error("unKnown menuName {}", dce.getBtnId());
        }
    }