w3c / webdriver-bidi

Bidirectional WebDriver protocol for browser automation
https://w3c.github.io/webdriver-bidi/
378 stars 42 forks source link

Add method to clear specific browsing data #798

Open whimboo opened 1 month ago

whimboo commented 1 month ago

The WebExtensions API supports a method to clear specific types of browsing data:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browsingData

Currently supported types of browsing data include:

While some data, like cookies, can already be isolated using different user contexts (i.e., containers in Firefox), there is no direct way to clean up other data types without restarting the browser with a fresh profile.

Since browser restarts are time-consuming, it would be beneficial to provide a method such as browser.clearBrowsingData, which accepts flags for specific data types (as listed above), allowing more granular cleanup without requiring a full restart.