Search.../

session

Used for session storage of data.

Description

Use the methods in Storage to manage session data.

Type:

StorageRead Only

Was this helpful?

Store an item in session storage

Code Example

Copy Code
1import {session} from 'wix-storage';
2
3// ...
4
5session.setItem("key", "value");
Retrieve an item from session storage

Code Example

Copy Code
1import {session} from 'wix-storage';
2
3// ...
4
5let value = session.getItem("key"); // "value"
Remove an item from session storage

Code Example

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

Code Example

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