Skip to content

Commit 80715c4

Browse files
Merge pull request #3369 from MicrosoftDocs/user-data-folder-doc-update
Update "Manage user data folders"
2 parents b0f7154 + 811529f commit 80715c4

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

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

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,12 @@ 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.
84+
* A UDF can only have at most one WebView2 session at a time.
9085

86+
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 among host apps that are in the same logon session (more specifically, only one HDESKTOP). See [Process model for WebView2 apps](../concepts/process-model.md).
9187

9288
<!-- ====================================================================== -->
9389
## How to move the UDF
@@ -96,7 +92,9 @@ To move a user data folder (UDF):
9692

9793
1. Shut down all WebView2 sessions.
9894

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

10199

102100
<!-- ====================================================================== -->
@@ -434,7 +432,7 @@ After creation of the session and UDF, browser data from your WebView2 control i
434432
<!-- ====================================================================== -->
435433
## Retrieving the UDF location
436434

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.
435+
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.
438436

439437
Reasons you might want to read the UDF location:
440438

@@ -549,7 +547,7 @@ private void OnGetUDFClick(object sender, RoutedEventArgs e)
549547
<!-- ====================================================================== -->
550548
## Clearing space in the UDF
551549

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.
550+
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.
553551

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

0 commit comments

Comments
 (0)