int ClearBrowserStorage(string types, bool onlyCallingBrowser, KioBrowserWndType wndTypes, KioBrowserType brTypes)
Clears the specified browser storage types (cache, cookies, etc) for the specified browser sections.
Security
Trust Level Required: Full Trust
Parameters
Name | Description |
types = 'all' |
(Optional) string A comma-separated list of storage types to clear. Types: all, cookies, indexeddb, local_storage, shader_cache, service_workers, cache_storage. |
onlyCallingBrowser = false |
(Optional) bool Only clear the calling browser. The wndTypes and brTypes parameters are ignored if this is true. |
wndTypes = KioBrowserWndType.Main|KioBrowserWndType.Popup|KioBrowserWndType.Secondary |
(Optional) KioBrowserWndType The KioWare window types to target for clearing. |
brTypes = KioBrowserType.Normal|KioBrowserType.Attract|KioBrowserType.Docked |
(Optional) KioBrowserType The KioWare browser types to target for clearing. |
Return
Returns an id that should be used to compare when OnDevToolsCmdResult is called, or 0 upon failure to queue command.
Remarks
After calling this function, OnDevToolsCmdResult and OnDevToolsMsg will be called in every browser and frame that has the required trust level. It is VERY IMPORTANT to compare the id with the id that was returned because it is possible that an internal KioWare action may cause the callbacks to be called.
Examples
var id = KioApp.ClearBrowserStorage("cache_storage,local_storage", false, KioBrowserWndType.Main|KioBrowserWndType.Popup|KioBrowserWndType.Secondary, KioBrowserType.Normal|KioBrowserType.Attract|KioBrowserType.Docked|KioBrowserType.Toolbar);
function OnDevToolsCmdResult(id, res, isErr)
{
KioApp.LogWarn("OnDevToolsCmdResult: "+id+": "+res+"\n"+isErr);
}
Requirements
KioWare for Windows version 8.36 or greater.