docs: clarify session.clearData() can delete more types than listed (#44927)
docs: warn that session.clearData() might delete more than expected Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Niklas Wenzel <dev@nikwen.de>
This commit is contained in:
parent
fa98b4d542
commit
dc53f6e73b
1 changed files with 6 additions and 2 deletions
|
@ -1509,7 +1509,9 @@ session is persisted on disk. For in memory sessions this returns `null`.
|
|||
#### `ses.clearData([options])`
|
||||
|
||||
* `options` Object (optional)
|
||||
* `dataTypes` String[] (optional) - The types of data to clear. By default, this will clear all types of data.
|
||||
* `dataTypes` String[] (optional) - The types of data to clear. By default, this will clear all types of data. This
|
||||
can potentially include data types not explicitly listed here. (See Chromium's
|
||||
[`BrowsingDataRemover`][browsing-data-remover] for the full list.)
|
||||
* `backgroundFetch` - Background Fetch
|
||||
* `cache` - Cache
|
||||
* `cookies` - Cookies
|
||||
|
@ -1535,7 +1537,7 @@ This method clears more types of data and is more thorough than the
|
|||
|
||||
**Note:** Cookies are stored at a broader scope than origins. When removing cookies and filtering by `origins` (or `excludeOrigins`), the cookies will be removed at the [registrable domain](https://url.spec.whatwg.org/#host-registrable-domain) level. For example, clearing cookies for the origin `https://really.specific.origin.example.com/` will end up clearing all cookies for `example.com`. Clearing cookies for the origin `https://my.website.example.co.uk/` will end up clearing all cookies for `example.co.uk`.
|
||||
|
||||
For more information, refer to Chromium's [`BrowsingDataRemover` interface](https://source.chromium.org/chromium/chromium/src/+/main:content/public/browser/browsing_data_remover.h).
|
||||
For more information, refer to Chromium's [`BrowsingDataRemover` interface][browsing-data-remover].
|
||||
|
||||
### Instance Properties
|
||||
|
||||
|
@ -1601,3 +1603,5 @@ app.whenReady().then(async () => {
|
|||
console.log('Net-logs written to', path)
|
||||
})
|
||||
```
|
||||
|
||||
[browsing-data-remover]: https://source.chromium.org/chromium/chromium/src/+/main:content/public/browser/browsing_data_remover.h
|
||||
|
|
Loading…
Reference in a new issue