From c6b24b302ae3b81cfa9e72284c3f75dc8cd80052 Mon Sep 17 00:00:00 2001 From: shynur Date: Fri, 22 Aug 2025 09:47:09 +0800 Subject: [PATCH] Update article.md --- 6-data-storage/01-cookie/article.md | 1 + 1 file changed, 1 insertion(+) diff --git a/6-data-storage/01-cookie/article.md b/6-data-storage/01-cookie/article.md index 4c9d81abd..4e125a41f 100644 --- a/6-data-storage/01-cookie/article.md +++ b/6-data-storage/01-cookie/article.md @@ -68,6 +68,7 @@ alert(document.cookie); // ...; my%20name=John%20Smith ```warn header="限制" 存在一些限制: +- 使用 `document.cookie` setter,一次只能 新建/更新 一个 cookie。 - `encodeURIComponent` 编码后的 `name=value` 对,大小不能超过 4KB。因此,我们不能在一个 cookie 中保存大的东西。 - 每个域的 cookie 总数不得超过 20+ 左右,具体限制取决于浏览器。 ```