Storage

Delete Storage

Clears or selectively deletes browser storage based on the requested storage type (cookies, localStorage, sessionStorage, cache or indexedDb). If no storage type is provided, globally clears all browser storage. Otherwise provides targeted removal using domain, key, path, or storeName.

NOTE

Deleting a specific 'storageType' without specifying any other parameters will delete all storage of that type.

Parameter Cookies LocalStorage SessionStorage Cache Storage IndexedDB
Domain action.Domain (implicit current origin) (implicit current origin) (implicit current origin) (unused, origin-scoped)
Path action.Path (cookie path) (unused) (unused) (unused) action.Path (database name)
StoreName (unused) (unused) (unused) action.StoreName (cache name) action.StoreName (object store)
Key action.Key (cookie name) action.Key action.Key action.Key (cache name / request) action.Key (record key)
Wildcard allowed? Domain, Path, Key Key only Key only StoreName, Key Path, StoreName, Key

Examples

MagicHelper: MagicHelper utility library

GPAL.MagicHelper.DeleteStorage(WebsiteStorageType storage type, bool deleteAcrossOrigins, string domain, string path, string key, string storeName);

Puppeteer Client: Puppeteer-style C# client

browser.PuppeteerClient.DeleteStorage(WebsiteStorageType.cookie).WithStorageDomain("ebay.com").WithStorageKey("utag_main_ses_id").Execute();

browser.PuppeteerClient.DeleteStorage(WebsiteStorageType.cookie).WithDeleteAcrossOrigins(true).Execute();

Puppeteer Communicator: Low-level communicator

await browser.PuppeteerCommunicator.DeleteStorage(string storageType, string sessionId, string domain, string storeName, string path, string key);

REST Client: Direct REST/HTTP client

GPAL.OttoMagicClient.WithEndpoint(ApiEndpoint.DeleteStorage).Execute();

GPAL.OttoMagicClient.WithEndpoint(ApiEndpoint.DeleteStorage).WithStorageType(WebsiteStorageType.cookie).WithStorageDomain("ebay.com").WithStorageKey("utag_main_ses_id").Execute();

GPAL.OttoMagicClient.WithEndpoint(ApiEndpoint.DeleteStorage).WithStorageType(WebsiteStorageType.cookie).WithStorageDomain("youtube.com").Execute();

GPAL.OttoMagicClient.WithEndpoint(ApiEndpoint.DeleteStorage).WithStorageType(WebsiteStorageType.cookie).Execute();

💬 Ask GPAL