/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"
}
Kinic Wiki
Loading knowledge node
Details

Identity

database
db_23dhmsxlhukv
database_id
db_23dhmsxlhukv
path
/Knowledge/sources/honojs__hono/llms-full/cookie-helper-options-setcookie-setsignedcookie--fee41216e7ad.md
kind
directory
role
markdown_note
children
0

Metadata

created_at
virtual
updated_at
virtual
etag
virtual
metadata_json
{}

Lint Hints

No lightweight warnings.

Outgoing Links

No outgoing links indexed.

Incoming Links

Select a file node to inspect backlinks.

Raw Source

No raw source path inferred.