/Knowledge/sources/honojs__hono/llms-full/cookie-helper-options-setcookie-setsignedcookie--fee41216e7ad.md
Cookie Helper: Options > setCookie & setSignedCookie - hono-docs
Cookie Helper: Options setCookie & setSignedCookie Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt set...
Cookie Helper: Options > setCookie & setSignedCookie
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#setcookie-setsignedcookie
Summary
- domain:
string- expires:Date- httpOnly:boolean- maxAge:number- path:string- secure:boolean- sameSite:'Strict'|'Lax'|'None'- priority:'Low' | 'Medium' | 'High'- prefix:secure|'host'- partit...
Content
- domain:
string - expires:
Date - httpOnly:
boolean - maxAge:
number - path:
string - secure:
boolean - sameSite:
'Strict'|'Lax'|'None' - priority:
'Low' | 'Medium' | 'High' - prefix:
secure|'host' - partitioned:
boolean
Example:
// Regular cookies
setCookie(c, 'great_cookie', 'banana', {
path: '/',
secure: true,
domain: 'example.com',
httpOnly: true,
maxAge: 1000,
expires: new Date(Date.UTC(2000, 11, 24, 10, 30, 59, 900)),
sameSite: 'Strict',
})
// Signed cookies
await setSignedCookie(
c,
'fortune_cookie',
'lots-of-money',
'secret ingredient',
{
path: '/',
secure: true,
domain: 'example.com',
httpOnly: true,
maxAge: 1000,
expires: new Date(Date.UTC(2000, 11, 24, 10, 30, 59, 900)),
sameSite: 'Strict',
}
)
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#setcookie-setsignedcookie",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / Cookie Helper > Options > `setCookie` & `setSignedCookie`",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 723,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "Cookie Helper: Options > setCookie & setSignedCookie",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}