Data storage is an essential feature for applications that wish to track user progress, enable login or perform other vital functions. There are many ways to store data about users however the most efficient solution depends on the problem you’re trying solve.
Local storage is a great option to store small amounts of data, such as user registration or login details that don’t require instant syncing. It’s only accessible with the client’s code and is limited by the hard drive size. Server-side scripts can’t alter it. Local storage is also vulnerable to lose data when the application is shut down, or the device is reset.
The database storage is ideal to store large amounts of data that may need to be edited. It lets you keep an eye on your users’ data by keeping their unique identifiers in the database table and then referencing that identifier when accessing the database. This approach is more complicated than other options, but http://virtuadata.net/how-to-service-your-own-computer/ it can be useful for large enterprise applications or larger apps that require to keep user data across multiple sessions.
WebView2 makes use of UDFs to store data from the browser, such as cookies permissions, cached resources. This data expires in accordance with the user’s Web and App Activity settings and can be cleared manually by the user via actions on Google. You must select the UDF that has Write Access to the WebView2 in order to save additional user data. See the WinUI 3.cs file in the WebView2Samples repo for an example of how to do this with ICoreWebView2Environment7.
