Data storage is a vital feature for applications that wish to track the progress of users, make login easier or perform other vital functions. There are many ways to store user information, but the most efficient solution is dependent on what sort of problems you’re trying to solve.

Local storage is great for storage of small amounts of http://virtuadata.net/technologies-for-everyday-usage/ data that don’t need instant sync, such as login or registration information for users. It’s only accessible with client-side code and is limited by the size of the hard drive. Server-side scripts can’t alter it. Local storage can also be vulnerable to lose data if an application is removed or the device reset.

The database storage is perfect for storing large quantities of data that will need to be edited. It allows you to keep track of your users’ data by keeping their unique identifiers in an existing database table, and connecting that identifier to the database. This is more complex than other options for data storage however, it can be an ideal choice for large or enterprise applications that require the storage of information from multiple sessions.

WebView2 utilizes UDFs to store information from the browser, like cookies, permissions, and cached resources. The data expires according to the user’s Web and Application Activity settings. It is cleared manually using Actions on Google. To store additional data about the user it is necessary to define an individual UDF location that has write access to the WebView2. See the WinUI 3.cs file in the WebView2Samples repo for an example of how to do this with ICoreWebView2Environment7.