Actions17
Clear Context
AI-generatedSummary
Clear various data storages and caches for the current browser context in a remote scraper session to reset its state.
Inputs
- Session ID — Session ID from a previous action to target the existing browser session; leave empty to create a new session automatically.
- Cookies — Choose whether to clear all cookies in the browser context (default true).
- Local Storage — Choose whether to clear localStorage data for the current origin (default true).
- Session Storage — Choose whether to clear sessionStorage data for the current origin (default true).
- Cache Storage — Choose whether to clear Cache Storage, including Service Worker caches, for the current origin (default true).
- Indexeddb — Choose whether to clear IndexedDB databases for the current origin (default true).
- Service Workers — Choose whether to unregister Service Workers for the current origin (default true).
- Browser Cache — Choose whether to clear the browser's HTTP/network cache (default true).
- Refresh — Choose whether to hard-refresh the current page after clearing to reload the clean state (default false).
Output shape
a single JSON object containing the origin whose data was cleared, a list of storage types cleared, and whether the page was refreshed
The output includes 'origin' (the URL origin affected), 'cleared' (array of cleared storage types), and 'refreshed' (boolean indicating if the page was hard-refreshed). The session_id is returned or maintained for session chaining.
Examples
Example 1: Clear all browser storage types and caches for a given session and refresh the page
Set Session ID to reuse existing session, set all clear options true (default), set Refresh to true
Example 2: Start a new session and clear only cookies and browser cache without refreshing
Leave Session ID empty, enable Cookies and Browser Cache only, disable Refresh.