Understanding how Embeddables stores user data in the browser
Embeddables uses Local Storage to persist User Data within the browser, so that when a user refreshes or returns later, they can pick up where they left off.
Local Storage is similar to Cookies, but has a few key differences which are described below.
As described in our User Data documentation, Embeddables stores user data in multiple contexts.
In the Embeddables Builder, you can choose which context to store each value, on a field-by-field basis.
The three contexts are:
Feature | Local Storage | Cookies |
---|---|---|
Storage Capacity | 5-10MB | 4KB |
Expiration | Doesn’t expire automatically | Can be set to expire |
Sent with Requests | No, stays in browser | Yes, sent with every HTTP request |
Accessibility | Same-origin only | Can be configured for cross-origin |
Manipulation | JavaScript only | JavaScript or HTTP headers |
Data stored in Local Storage persists until:
Unlike cookies, Local Storage doesn’t have built-in expiration mechanisms. This allows Embeddables to maintain a consistent user experience even if users return to your Embeddable weeks or months later.
Local Storage is generally considered more privacy-friendly than cookies because:
Understanding how Embeddables stores user data in the browser
Embeddables uses Local Storage to persist User Data within the browser, so that when a user refreshes or returns later, they can pick up where they left off.
Local Storage is similar to Cookies, but has a few key differences which are described below.
As described in our User Data documentation, Embeddables stores user data in multiple contexts.
In the Embeddables Builder, you can choose which context to store each value, on a field-by-field basis.
The three contexts are:
Feature | Local Storage | Cookies |
---|---|---|
Storage Capacity | 5-10MB | 4KB |
Expiration | Doesn’t expire automatically | Can be set to expire |
Sent with Requests | No, stays in browser | Yes, sent with every HTTP request |
Accessibility | Same-origin only | Can be configured for cross-origin |
Manipulation | JavaScript only | JavaScript or HTTP headers |
Data stored in Local Storage persists until:
Unlike cookies, Local Storage doesn’t have built-in expiration mechanisms. This allows Embeddables to maintain a consistent user experience even if users return to your Embeddable weeks or months later.
Local Storage is generally considered more privacy-friendly than cookies because: