Skip to content

Commit

Permalink
chore: update ref to docs (🤖)
Browse files Browse the repository at this point in the history
  • Loading branch information
1 parent e08c6d9 commit f769255
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/latest/.sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e1d9df224c631e8828035149dee39e55f82ca40c
0af5ec37583a557092294dc4ccc432f6eafc5003
32 changes: 32 additions & 0 deletions docs/latest/api/session.md
Original file line number Diff line number Diff line change
Expand Up @@ -1367,6 +1367,36 @@ specified when registering the protocol.
Returns `Promise<void>` - resolves when the code cache clear operation is complete.
#### `ses.getSharedDictionaryUsageInfo()`
Returns `Promise<SharedDictionaryUsageInfo[]>` - an array of shared dictionary information entries in Chromium's networking service's storage.
Shared dictionaries are used to power advanced compression of data sent over the wire, specifically with Brotli and ZStandard. You don't need to call any of the shared dictionary APIs in Electron to make use of this advanced web feature, but if you do, they allow deeper control and inspection of the shared dictionaries used during decompression.
To get detailed information about a specific shared dictionary entry, call `getSharedDictionaryInfo(options)`.
#### `ses.getSharedDictionaryInfo(options)`
* `options` Object
* `frameOrigin` string - The origin of the frame where the request originates. It’s specific to the individual frame making the request and is defined by its scheme, host, and port. In practice, will look like a URL.
* `topFrameSite` string - The site of the top-level browsing context (the main frame or tab that contains the request). It’s less granular than `frameOrigin` and focuses on the broader "site" scope. In practice, will look like a URL.
Returns `Promise<SharedDictionaryInfo[]>` - an array of shared dictionary information entries in Chromium's networking service's storage.
To get information about all present shared dictionaries, call `getSharedDictionaryUsageInfo()`.
#### `ses.clearSharedDictionaryCache()`
Returns `Promise<void>` - resolves when the dictionary cache has been cleared, both in memory and on disk.
#### `ses.clearSharedDictionaryCacheForIsolationKey(options)`
* `options` Object
* `frameOrigin` string - The origin of the frame where the request originates. It’s specific to the individual frame making the request and is defined by its scheme, host, and port. In practice, will look like a URL.
* `topFrameSite` string - The site of the top-level browsing context (the main frame or tab that contains the request). It’s less granular than `frameOrigin` and focuses on the broader "site" scope. In practice, will look like a URL.
Returns `Promise<void>` - resolves when the dictionary cache has been cleared for the specified isolation key, both in memory and on disk.
#### `ses.setSpellCheckerEnabled(enable)`
* `enable` boolean
Expand Down Expand Up @@ -1544,6 +1574,8 @@ 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`.

**Note:** Clearing cache data will also clear the shared dictionary cache. This means that any dictionaries used for compression may be reloaded after clearing the cache. If you wish to clear the shared dictionary cache but leave other cached data intact, you may want to use the `clearSharedDictionaryCache` method.

For more information, refer to Chromium's [`BrowsingDataRemover` interface][browsing-data-remover].
### Instance Properties
Expand Down
19 changes: 19 additions & 0 deletions docs/latest/api/structures/shared-dictionary-info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "SharedDictionaryInfo Object"
description: ""
slug: shared-dictionary-info
hide_title: false
---

# SharedDictionaryInfo Object

* `match` string - The matching path pattern for the dictionary which was declared in 'use-as-dictionary' response header's `match` option.
* `matchDestinations` string[] - An array of matching destinations for the dictionary which was declared in 'use-as-dictionary' response header's `match-dest` option.
* `id` string - The Id for the dictionary which was declared in 'use-as-dictionary' response header's `id` option.
* `dictionaryUrl` string - URL of the dictionary.
* `lastFetchTime` Date - The time of when the dictionary was received from the network layer.
* `responseTime` Date - The time of when the dictionary was received from the server. For cached responses, this time could be "far" in the past.
* `expirationDuration` number - The expiration time for the dictionary which was declared in 'use-as-dictionary' response header's `expires` option in seconds.
* `lastUsedTime` Date - The time when the dictionary was last used.
* `size` number - The amount of bytes stored for this shared dictionary information object in Chromium's internal storage (usually Sqlite).
* `hash` string - The sha256 hash of the dictionary binary.
12 changes: 12 additions & 0 deletions docs/latest/api/structures/shared-dictionary-usage-info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: "SharedDictionaryUsageInfo Object"
description: ""
slug: shared-dictionary-usage-info
hide_title: false
---

# SharedDictionaryUsageInfo Object

* `frameOrigin` string - The origin of the frame where the request originates. It’s specific to the individual frame making the request and is defined by its scheme, host, and port. In practice, will look like a URL.
* `topFrameSite` string - The site of the top-level browsing context (the main frame or tab that contains the request). It’s less granular than `frameOrigin` and focuses on the broader "site" scope. In practice, will look like a URL.
* `totalSizeBytes` number - The amount of bytes stored for this shared dictionary information object in Chromium's internal storage (usually Sqlite).
2 changes: 2 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,8 @@ module.exports = {
'latest/api/structures/web-request-filter',
'latest/api/structures/web-source',
'latest/api/structures/window-open-handler-response',
'latest/api/structures/shared-dictionary-info',
'latest/api/structures/shared-dictionary-usage-info',
],
},
],
Expand Down

0 comments on commit f769255

Please sign in to comment.