AboutSupportDeveloper GuideVersion 45.146.100.30

Options for clearing various types of browsing data. Based on Electron's session.clearData() API.

interface ClearDataOptions {
    avoidClosingConnections?: boolean;
    dataTypes?: (
        | "backgroundFetch"
        | "cache"
        | "cookies"
        | "downloads"
        | "fileSystems"
        | "indexedDB"
        | "localStorage"
        | "serviceWorkers"
        | "webSQL")[];
    excludeOrigins?: string[];
    originMatchingMode?: "third-parties-included" | "origin-in-all-contexts";
    origins?: string[];
}

Properties

avoidClosingConnections?: boolean

Skips deleting session/authentication cookies currently maintaining active connections. (Default: false)

dataTypes?: (
    | "backgroundFetch"
    | "cache"
    | "cookies"
    | "downloads"
    | "fileSystems"
    | "indexedDB"
    | "localStorage"
    | "serviceWorkers"
    | "webSQL")[]

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.

  • backgroundFetch - Background Fetch
  • cache - Cache (includes cachestorage and shadercache)
  • cookies - Cookies
  • downloads - Downloads
  • fileSystems - File Systems
  • indexedDB - IndexedDB
  • localStorage - Local Storage
  • serviceWorkers - Service Workers
  • webSQL - WebSQL
excludeOrigins?: string[]

Clear data for all origins except these ones. Cannot be used with origins. Example: ['http://workspace.here.io']

originMatchingMode?: "third-parties-included" | "origin-in-all-contexts"

The behavior for matching data to origins.

  • third-parties-included (default) - Storage is matched on origin in first-party contexts and top-level-site in third-party contexts.
  • origin-in-all-contexts - Storage is matched on origin only in all contexts.
origins?: string[]

Clear data for only these origins. Cannot be used with excludeOrigins. Example: ['http://localhost:8081', 'https://example.com']