# http: cookie 过大

- **ID:** `go/http-cookie-too-large`
- **领域:** go
- **类别:** io_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

cookie 超过最大允许大小（4KB），导致服务器拒绝。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.21 | active | — | — |

## 解决方案

1. **** (90% 成功率)
   ```
   Use server-side storage (e.g., session) and store a small cookie ID.
   ```

## 无效尝试

- **** — HTTP specification does not support cookies larger than 4KB. (90% 失败率)
- **** — This will trigger the same error. (80% 失败率)
