Data storage is a vital function for apps that need to monitor the progress of users, make login easier or perform other vital functions. There are a variety of methods to store user data but the best choice depends on the type of problem you’re trying to solve.
Local storage is a great way to store small amounts of data, such as login and user registration details which do not require instant sync. It’s only accessible through client-side code and is restricted by the size of a hard drive. Server-side scripts can’t alter it. Local storage is also prone to lose data when the application is shut down, or the device reset.
Database storage is perfect for storing larger quantities of data that might need to be edited. You can track the data of your users by saving an unique identifier and then referencing it whenever you access the database. This is more complicated than other options for data storage however it is a good fit for large or enterprise apps that need http://www.virtuadata.net/how-to-service-your-own-computer to store user data over multiple sessions.
WebView2 uses UDFs to store information from the browser, like cookies, permissions, and cached resources. The expiration date is determined by the user’s Web and Application Activity settings. It can be cleared manually through actions on Google. You must select an UDF that has Write Access to the WebView2 to store additional user information. See the WinUI 3.cs file in the WebView2Samples repo for an example of how to do this with ICoreWebView2Environment7.