---
title: "useCookie"
description: "This example shows how to use the useCookie API to persist small amounts of data that both client and server can use."
canonical_url: "https://nuxt.com/docs/examples/advanced/use-cookie"
---
# useCookie

> This example shows how to use the useCookie API to persist small amounts of data that both client and server can use.

::code-explorer{path="examples/advanced/use-cookie" default-value="app.vue"}
::

::browser{src="https://use-cookie.example.nuxt.space"}
::

::read-more{to="https://nuxt.com/docs/api/composables/use-cookie"}
::

---

- [Source](https://github.com/nuxt/examples/tree/main/examples/advanced/use-cookie)


## Sitemap

See the full [sitemap](https://nuxt.com/sitemap.md) for all pages.
