Search.../

clear( )

Removes all items from local, session, or memory storage.

Syntax

function clear(): void

clear Parameters

This function does not take any parameters.

Returns

This function does not return anything.

Return Type:

void

Related Content:

Was this helpful?

Remove all items from local storage

Code Example

Copy Code
1import {local} from 'wix-storage';
2
3// ...
4
5local.clear();
Remove all items from session storage

Code Example

Copy Code
1import {session} from 'wix-storage';
2
3// ...
4
5session.clear();
Remove all items from memory storage

Code Example

Copy Code
1import {memory} from 'wix-storage';
2
3// ...
4
5memory.clear();