> For the complete documentation index, see [llms.txt](https://ngxf.gitbook.io/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ngxf.gitbook.io/platform/server-interaction/cookies.md).

# Cookies

The CookiesDirective allows you to set, get and remove cookies.

## Set Cookie

An example in `COMPONENT.template.html`.

```markup
<ng-container *cookies="let cookie set 'ngxf' value 'Best Of The Best' path '/' domain: 'localhost' expires '01 Oct 2020'">
    {{ cookie }}
</ng-container>
```

## Get Cookie

An example in `COMPONENT.template.html`.

```markup
<ng-container *cookies="let cookie get 'ngxf'">
    {{ cookie }}
</ng-container>
```

## Remove Cookie

An example in `COMPONENT.template.html`.

```markup
<ng-container *cookies="let cookie remove 'ngxf' path '/' domain: 'localhost'">
    {{ cookie }}
</ng-container>
```
