> For the complete documentation index, see [llms.txt](https://docs.ebbot.ai/ebbot-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ebbot.ai/ebbot-docs/developer-resources/ebbot-chat/widget-cookies-and-storage.md).

# Widget Cookies & Storage

To function properly, the chat widget stores certain information in your browser. In this context, "cookies & storage" refers to browser-side storage technologies, including `localStorage` and `sessionStorage`.

{% hint style="info" %}
The widget prefixes all storage entries with the current bot ID, so the actual browser key is stored as `<botId>_<key>`.
{% endhint %}

Below is a list of storage keys the widget may use, depending on configuration and enabled features.

## Local Storage / Session Storage

By default, the widget stores data in `localStorage`. If the "Clear chat when session ends" setting is enabled, the widget stores the same data in `sessionStorage` instead.

| Key                                      | Description                                                                                                                                  |
| ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `ebbot_alert_box_visible`                | Flag used to remember whether the alert box should be visible                                                                                |
| `ebbot_allow_upload`                     | Flag used to control whether file upload is enabled                                                                                          |
| `ebbot_chat_session_client_id`           | Current bot/client identifier used for the session                                                                                           |
| `ebbot_chat_session_id`                  | Current chat/session ID                                                                                                                      |
| `ebbot_chat_session_name`                | Session/user display name, initially auto-generated                                                                                          |
| `ebbot_clicked_buttons`                  | Stores a map of clicked button IDs per message so previously used buttons can remain disabled after refresh                                  |
| `ebbot_initialized`                      | Flag indicating whether there is an active initialized chat session                                                                          |
| `ebbot_input_field_visibility`           | Flag intended to control input field visibility                                                                                              |
| `ebbot_is_agent_handover_logic_executed` | Flag indicating whether the user has already gone through the agent handover flow                                                            |
| `ebbot_is_widget_box_visible`            | Flag used to preserve the widget's minimized/maximized state after refresh                                                                   |
| `ebbot_last_action`                      | Stores the last recorded user interaction                                                                                                    |
| `ebbot_session_triggers`                 | Stores conversation triggers executed once per session                                                                                       |
| `ebbot_triggers`                         | Stores regular conversation triggers that have been executed                                                                                 |
| `ebbot_agent_message_read_at`            | Timestamp for when agent messages were last marked as read                                                                                   |
| `ebbot_session_token`                    | Token used to authenticate the socket connection                                                                                             |
| `ebbot_socket_id`                        | Stores the ID of the most recent socket connection, used in multi-tab handling                                                               |
| `ebbot_triggers_disabled`                | Flag that disables conversation starters until re-enabled or reset                                                                           |
| `ebbot_attention_seeker_disabled`        | Stores disabled attention seeker / conversation starter IDs                                                                                  |
| `ebbot_has_unread_notifications`         | Flag controlling whether the unread notification indicator should be shown                                                                   |
| `ebbot_snoozed_until`                    | Flag indicating whether browser/web push notifications are snoozed                                                                           |
| `ebbot_agents_info`                      | Stores basic information about agents involved in the conversation, such as name and avatar, so chat history can reflect agent handovers     |
| `ebbot_rating_type`                      | Stores the selected rating display type, such as emoji or star                                                                               |
| `ebbot_user_info`                        | Stores user attributes associated with the session, including the generated session name and any data set through `Ebbot.setUserAttribute()` |
| `ebbot_disabled_chat_translation`        | Flag indicating whether the end user has disabled translated agent messages                                                                  |

## Personal data

{% hint style="warning" %}
The widget does not require sensitive personal data in browser storage to function. However, some stored values **may still qualify as personal data** depending on how the widget is configured and used.
{% endhint %}

In particular, `ebbot_user_info` can contain user attributes provided by the integrator through `Ebbot.setUserAttribute()`. For that reason, the exact contents of browser storage may vary by implementation.

## Data expiration time

{% tabs %}
{% tab title="localStorage" %}
Stored data persists until it is removed by the application or cleared through the user's browser settings.
{% endtab %}

{% tab title="sessionStorage" %}
Stored data normally persists only for the lifetime of the browser tab or session.
{% endtab %}
{% endtabs %}

In both cases, stored data may also be removed by the user through browser privacy settings, for example by clearing browsing data.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ebbot.ai/ebbot-docs/developer-resources/ebbot-chat/widget-cookies-and-storage.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
