---
id: cookie
title: Cookie
titleEn: Cookie
prev: javascript/validator.html
next: javascript/fastclick.html
source: js/util.cookie.js
doc: docs/javascript/cookie.md
---

# Cookie
---

An encapsulation of Cookie methods via [Nicholas C. Zakas](http://www.nczonline.net/)。

API: `$.AMUI.utils.cookie`。

- `cookie.set(name, value, expires, path, domain, secure)` - Set cookie；
- `cookie.get(name)` - Get cookie；
- `cookie.unset(name, path, domain, secure)` - Delete cookie

__Reference:__

- https://developer.mozilla.org/en-US/docs/Web/API/document.cookie

