Browser history behavior when setting URL parameters with Navigate

Hi :waving_hand:

I have a question about how browser history is updated when using the navigation action node to set URL parameters in Appfarm.

Setup:
I have a button that opens a full-screen dialog and uses Navigate to set URL parameters. When I use Navigate without setting View, the new URL replaces the old one in the browser history (see screenshot).

Issue:
When using the browser back button after opening the dialog and setting the URL parameter, it navigates back what seems like two steps (see example in Loom). For some users this feels a bit confusing.

Is there a workaround for this?
Or is it possible to have the new URL added to the browser history instead of replacing the current one when only URL parameters are set?

Thanks!
Sigurd

Hi!

When you use the Navigate action node without setting a View, it replaces the current URL in the browser history instead of adding a new entry. This is why when users click the browser back button, it appears to go back two steps - it’s actually going back to the URL that existed before the replacement occurred.

Instead of using Navigate without a View, explicitly set the current View along with your URL parameters:

  • In your Navigate action node, set the View property explicitly to the current view

  • Set your URL parameters as usual

  • Set Keep existing URL Parameters to true if you want to preserve other parameters

This will add a new entry to the browser history instead of replacing the current one.

Hope that helps!

2 Likes