What is the proper use case for AppData vs PageData

I have seen the AppData will be transferred via URL to other pages. I feel that this is not very secure for sensitive data and can even easily reach the URL limit. What is your advice: when should I use AppData and reload other data necessary on another page at Page Enter?

Any advice is highly appreciated.

Hello @Jorg_Beyer,

You can use AppData in case you have some data (variable) you want to access from different pages.
And if you have some data that is more local and used within one page (e.g. in different components) you can use PageData.

Regards,
Olha

Hello,
thank you for your reply. I understand the concept of Page and App Data. If I to access data from other pages I could also reload missing data at any page and keep them as Page Data.
But my questions remain,

  • are AppData handed over to other pages via URL ?
  • Is this the right mechanism for secure data?
  • what do I HAVE to do if I reach URL limits with all the AppPage data?

are AppData handed over to other pages via URL?

no, this is the data model stored in memory within the app level.

what do I HAVE to do if I reach URL limits with all the AppPage data?

according to the first question - you don’t need to pass AppData in URL as it is available on every page.
URL should contain the minimum data required to restore app/page data.

Is this the right mechanism for secure data?

this question is not entirely clear for me as there’s no need to pass AppData in url.

Ok, understood. Thank you for clarification. What parameter are used in the URL looking like PageData?

For the AppData there is no specific URL parameter, the data model is initialised on the app start, and then you can modify the data model from any page, the model is not persistent either, so if you would like to store it and the restore after refresh the browser page you can use LocalStorage.

I guess the effect that I recognized is based on this command:

These Data is transferred via URL, right. And I set Page Data as data - my fault.

I’m reviving this old thread for a related question :
Is there a way to initialise app data regardless of the page which is opened ?
Or is it necessary to replicate init on each page load ?

@MF_de_Preval take a look at this one: How to hold data through out App? - #2 by mark-piller

Thanks. I was aware of this, but I was wondering wether there was a way of having something similar to ‘On page load’ event, but at the app level (not page depending) …

Hi @MF_de_Preval

Yes, this is a good point, we have that in our roadmap and I assume we will implement it in the near future

Regards,
Vlad

Until it is implemented you can use a workaround with Layouts, the idea is quite simple:

  1. having one Layout without any UI
  2. all pages use the same Layout
  3. add logic in the Layout