# How to change a URL query parameter without reloading the page

**URL:** <https://forum.bubble.io/t/how-to-change-a-url-query-parameter-without-reloading-the-page/68467>\
**Category:** Questions\
**Created:** [October 3, 2019, 8:22pm UTC](https://forum.bubble.io/t/how-to-change-a-url-query-parameter-without-reloading-the-page/68467 "2019-10-03T20:22:14Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![sudsy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sudsy/32/114637_2.png) [@sudsy](https://forum.bubble.io/u/sudsy)\
**Post date:** [April 14, 2021, 4:11pm UTC](https://forum.bubble.io/t/how-to-change-a-url-query-parameter-without-reloading-the-page/68467/11 "2021-04-14T16:11:33Z")

</div>

> [@boston85719](#):
>
> I am probably going to ask a few dumb questions right now

There is no such thing as a dumb question. Only dummies _don’t_ ask questions. 😏

&nbsp;

> [@boston85719](#):
>
> Would this allow me to set a parameter in the URL without having to denote the specific page?

You should shift your thinking away from “pages” toward “URLs”. My plugin works only within the context of the current page and only with URLs. To achieve what you’d want, you’d simply “navigate” to the desired URL - i.e. one _without_ the QS param. That can be done using a hyperlink OR via a workflow action. The page won’t reload; the URL simply updates and Sudsy notifies your app of such.

So yes, you can achieve what you want - just not exactly _how_ you might have thought. You’d simply use the dynamic expression builder to specify the destination URL / route.

&nbsp;

> [@boston85719](#):
>
> If I am planning on making a one page app and was expecting to just use the index page, it seems like the plugin would not function based on Bubble limitations.

That’s exactly right. Bubble _assumes_ that the first path parameter following the domain is an actual Bubble page. If it’s not, you get a 404. That’s just how Bubble works whether or not the plug-in is installed.

&nbsp;

> [@boston85719](#):
>
> Is the proper approach to just have two pages, an index and a ‘main’ page that once the user navigates to the index page they are automatically redirected to the ‘main’ page where all the functionality of the app lives so as to make use of the all of the plugins features and capabilities?

That’s how [some users](http://forum.bubble.io/t/bubble-translation-ideas/68812/18) are doing it. I’m probably not in a position to make a recommendation, as the best approach depends on your app and your desired UX. I’d probably use the index page as a landing page and have the app reside at `https://mysite.com/app`.

The way I use Sudsy _most_ of the time, though, is not for SPA, but rather as a way to “segment” my application for organizational and SEO purposes. It also makes the app easier to maintain IMO.

For instance, an app I’m currently building has an `eateries` page, but that one page has the following “routes” (among others):

- `https://mysite.com/eateries`  
List of restaurants.

- `https://mysite.com/eateries?search=jojo`  
Popup to search for a specific eatery.

- `https://mysite.com/eateries/jojos-cafe`  
Detail view for individual restaurant.

- `https://mysite.com/eateries/jojos-cafe/location`  
Popup with map and directions to individual restaurant.

Similarly, there’s a single Bubble `account` page with different “routes” for managing one’s profile, viewing orders, managing payment methods, etc.

For working with query string parameters, Sudsy publishes a list of custom objects - each having a “Name” and “Value” attribute. So, to get the value of a specific qs param, you’d filter the list with a constraint _where Name = the\_name_ and get `:first item's Value`. To check if a particular qs param is present would be a similar approach but check if `:first item is empty`. IOW, you would **not** use Bubble’s built-in mechanism for getting / setting query string parameters. Rather, standard list filtering techniques would be used instead.

Hope that helps somewhat. If you have any other questions, let me know.

-Steve

---

_[View the full topic](https://forum.bubble.io/t/how-to-change-a-url-query-parameter-without-reloading-the-page/68467)._
