Resetting parameter sent to a page via URL

Hello Bubblers,

Probably a simple question, but I can’t find an answer on my own… I am sending data to a page using “Go to page” action. The parameter is sent via URL (if I understand it correctly). On that new page I assign it to a custom state, which I can later reset. However, if I refresh the page (which I need to do, or user may do), the original variable (from URL) hits back. This is undesirable.

Is there a way to fix this? Of course I can always call the page itself using the same “Go to page” action", but it will again require to fill out “Data to send”, which I don’t want to do.

Many thanks in advance.

1 Like

That’s the only way reset a URL parameter. Keep in mind when you navigate to the same page it’s instant. It doesn’t reload all your data.

1 Like

@eli how to send empty parameters and nothing will be affected by them? Do I need to use “Ignore Empty constraints”?

Hi @grace.hallak, yes, the Ignore empty constraints is exactly how you would do that.

1 Like

i tried ignore constraints and it is making things worse

I’m late on this post but I just figured out a way to do it. I was having the exact same problem as the OP - when I hit the refresh button on the browser, the page URL would stay. This wouldn’t work because I had a Toast Notification that ran based on a page parameter.

So the way to do it is actually pretty simple:

image

Just make a “go to page action” go to the current page and send no data. Doing this will clear the URL parameter.

2 Likes

@wesfrank this information was a godsend. You wouldn’t believe how much time I’ve spent trying to figure this one out. Thank you so much!

1 Like

There’s also a plugin in the marketplace that remove empty url parameters

1 Like

@Christophe_HK found it, thank you for pointing me to it. Here’s a link in case someone else needs to use this plugin: Remove empty URL parameters Plugin | Bubble

2 Likes

Thank you for sharing this. Spent hours racking my brain. Even used Plugin Browser to replace the URL and that didn’t work either. Can’t believe there isn’t a better way… but it works. As mine is in a “reusable item”, had to put 4 different events with “go to page X if page name is X”, but it works.