Skip to content

Commit 99b52a9

Browse files
authored
Update user-data-folder.md
Try to fix up a section of the UDF doc which is hard to read and not accurate.
1 parent 1290722 commit 99b52a9

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

microsoft-edge/webview2/concepts/user-data-folder.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,11 @@ The UDF is created on startup of the WebView2 host app, if the UDF doesn't exist
7878
<!-- ====================================================================== -->
7979
## How many UDFs are created?
8080

81-
Each instance of a WebView2 control is associated with a user data folder (UDF).
81+
Each instance of a WebView2 control is associated with a WebView2 session.
8282

83-
Each WebView2 session must have a UDF. There's only 1 active UDF per WebView2 session.
84-
85-
There is at least one UDF per app WebView2 session. It's possible for your host app to overlap them, by specifying a custom UDF location.
86-
Or, you can have one UDF per machine. This depends on how your host app configs the UDF.
87-
88-
A UDF can be either per user, if the app was installed per-user.
89-
If the host app is installed per-user, each UDF is unique to a user, if not otherwise specified.
83+
Each WebView2 session has exactly one UDF and a UDF can only have at most one WebView2 session at a time.
9084

85+
A WebView2 control shares its WebView2 session with any other WebView2 control that uses the same UDF. This is true whether the WebView2 controls are in the same host app or different host apps. However a UDF may only be shared amongst host apps in the same logon session (more specifically, only one HDESKTOP). See [Process model for WebView2 apps](../concepts/process-model.md) for more information.
9186

9287
<!-- ====================================================================== -->
9388
## How to move the UDF
@@ -96,7 +91,9 @@ To move a user data folder (UDF):
9691

9792
1. Shut down all WebView2 sessions.
9893

99-
1. Start a new WebView2 host app session, specifying a new custom UDF location.
94+
1. Move the contents of the UDF to the new custom UDF location.
95+
96+
1. Start a new WebView2 host app session, specifying the new custom UDF location.
10097

10198

10299
<!-- ====================================================================== -->
@@ -434,7 +431,7 @@ After creation of the session and UDF, browser data from your WebView2 control i
434431
<!-- ====================================================================== -->
435432
## Retrieving the UDF location
436433

437-
To find out what the user data folder (UDF) location was set to, use the `UserDataFolder` property. This read-only property returns the UDF location for the WebView2 app.
434+
To find out what the user data folder (UDF) location was set to, use the `CoreWebView2Environment.UserDataFolder` property. This read-only property returns the UDF location for the WebView2 session.
438435

439436
Reasons you might want to read the UDF location:
440437

@@ -549,7 +546,7 @@ private void OnGetUDFClick(object sender, RoutedEventArgs e)
549546
<!-- ====================================================================== -->
550547
## Clearing space in the UDF
551548

552-
Instead of deleting the user data folder (UDF), clear browsing data from the UDF. For example, clear user data and history when a user signs out.
549+
Instead of deleting the entire user data folder (UDF), you can use WebView2 APIs to clear specific browsing data from the UDF. For example, you can clear user data and history when a user signs out of your app.
553550

554551
See [Clear browsing data from the user data folder](clear-browsing-data.md).
555552

0 commit comments

Comments
 (0)