Bubble Docs
Ask or search…
K

Temporary data

This section covers temporary data, which is different types of variables that you can use to store data temporarily.
Sometimes you'll need to store some information temporarily in your application. They can be considered variables and are not in any permanent storage like the database, but live for as long as they are needed.
Bubble offers two different types of temporary data that have different properties:

Custom states

Custom states are a sort of variable that you can store on any element on your page, including the page itself. A custom state can be set up to contain any kind of elementary data (such as text, numbers and dates), static data like an Option set or dynamic data from your database. You set the type of data the custom state should hold, and whether it should holda single valua or a list of values. You can then populate the custom state with data using workflows (or in some cases set a default value). You can create as many custom states as you need.
Custom states are reset when the page is reloaded.

URL parameters

URL parameters are strings of text that you can add to the URL of your application to store information. You can specify the type of data they are holding, and the data will be a visible part of the page's url. URL parameters are structured in key-value pairs and are separated from the main URL with a question mark (?). Additional parameters are separated with an ampersand (&).
https://www.mydomain.com/page?parameter1=value1&parameter2=value2
In the example above , everything after the ? makes up the URL parameters. URL parameters are great for navigation, since they let your users use the browser's back button to go back one step.

The difference between Custom states and URL parameters

Custom states
URL parameters
... are reset when the page is reloaded
... are not reset on page reload, but may disappear if you modify the URL with a workflow or the user deletes it from the URL
... are "invisible" to the user (but not encrypted or meant to hold any sensitive data)
... are visible to the user in the browser's URL bar
... can hold a list of values
... one parameter can only hold a single value
... can have a default value at page load (depending on the type of data)
... has to be set by a workflow from the same or another page, or be set by the user
... cannot be changed by a user unless you set up workflows for it
... can be edited by the user at will by making changes to the URL or using navigation gestures like clicking the browser's back button
Last modified 11mo ago