App Variables Across All App Pages
Multi-page applications often need to share information as users move from one page to another. Customer IDs, selected products, search results, shopping carts, and temporary user choices all need to remain available throughout the application.
Many applications achieve this by passing values through URL parameters, but this approach isn’t always the most convenient or secure.
The Limitations of URL Parameters
URL parameters work well for passing public information between pages, but they come with trade-offs.
Every navigation action needs to pass the required parameters, making page transitions more complex. Because the values are part of the URL, they’re also visible to users and can often be modified manually, making them unsuitable for storing many types of application data.
Share Data Across Your App
App variables provide a simple way to store information that every page in the application can access.
Instead of passing values every time users navigate between pages, information can be stored once and used wherever it’s needed throughout the application. This creates cleaner navigation and simplifies application logic.
Ideal for Temporary Application State
Not every value needs to be stored permanently.
App variables are ideal for information that’s only needed while the user is working in the application, such as the current customer, selected record, shopping cart, wizard progress, or other temporary state shared across multiple pages.
Keep Navigation Simple
Managing shared data separately from the URL makes applications easier to build and maintain.
By reducing the need to pass parameters between pages, builders can focus on creating smoother user experiences while keeping application logic cleaner and easier to understand.