# Cookie Block

<figure><img src="/files/2GEWiUSQ3KleQUwbBDJW" alt=""><figcaption></figcaption></figure>

This block allows you to receive, set or delete cookies. The block settings contain three modes of operation:

* **Get cookie.** In this mode, the block receives cookies. Below is a screenshot with the settings of this mode.

<figure><img src="/files/2IxZssb2EbpBR8JYkxhw" alt=""><figcaption></figcaption></figure>

1. **Get all cookies.** Defines whether to get one or all cookies
2. **Use JSON format.** Settings such as URL, Name, Path and Domain can be written in json format instead of a separate entry in the menu.
3. **URL.** The URL with which the cookie to retrieve is associated. This field is optional when you turn on "Get all cookies"
4. **Name.** The name of the cookies to get
5. **Path.** The path of the cookies
6. **Domain.** Domain to which cookies should be linked (with this exact domain or one of its sub-domains)

* **Set a cookie.** In this mode, the block sets cookies. Below is a screenshot with the settings of this mode.

<figure><img src="/files/5nsA8WaJuiyCFrB77NYq" alt=""><figcaption></figcaption></figure>

1. **Use JSON format.** Similar to the previous mode, it allows you to record all the mode settings in json format.
2. **URL.** Defines the request URI to be assigned to the cookie. This value may affect the domain and path values of the created cookie.
3. **Name.** The name of the cookie
4. **Path.** The path of the cookies
5. **Value.** The value of the cookies
6. **Domain.** This is the domain of the cookie.
7. **sameSite.** This is the value that indicates the SameSite state of the cookie. Probable values: lax, strict, or you can keep it empty.
8. **expirationDate.** The cookie expires according to the number of seconds.

* **Remove cookies.** In this mode, the block deletes cookies. Here you need to specify the information in the URL, Name, Path settings. This data can also be specified in json format using the Use JSON format setting.


---

# Agent Instructions: 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:

```
GET https://docs.goless.com/blocks/browser/cookie-block.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
