There are three types of storage:
| Type | Persistence | Data Limit | Typical Usage |
|---|---|---|---|
| Local | Data never expires and persists even when the site visitor closes the page. When the site visitor reopens the page later, the data can still be retrieved. | 50kb | Store site visitor state between sessions. |
| Session | Data is available while session is active. Once the browser tab or window closes, the data expires. Reloading the page or navigating to other pages doesn't affect session storage. | 1mb | Pass data between pages on the site. |
| Memory | Data expires when the site visitor closes or refreshes the current page, or navigates to a different page. | 1mb | |
| Store data on the current page only. |
Get hands-on experience with the Frontend Storage API on our Hello Storage example page, or watch a demo:
Some older browsers may not fully support @wix/site-storage. See Browser compatibility
for more information.