Chromium67 Cookies数量限制
- Chromium67对Cookies数量限制如下
Max Cookies Per Domain | Max Cookie Size Per Cookie(byte) | Max Cookies |
---|---|---|
180 | 4096 | 3300 |
- 源码(chromium)
// chromium/src/net/cookies/cookie_monster.h
// Cookie garbage collection thresholds. Based off of the Mozilla defaults.
// When the number of cookies gets to k{Domain,}MaxCookies
// purge down to k{Domain,}MaxCookies - k{Domain,}PurgeCookies.
// It might seem scary to have a high purge value, but really it's not.
// You just make sure that you increase the max to cover the increase
// in purge, and we would have been purging the same number of cookies.
// We're just going through the garbage collection process less often.
// Note that the DOMAIN values are per eTLD+1; see comment for the
// CookieMap typedef. So, e.g., the maximum number of cookies allowed for
// google.com and all of its subdomains will be 150-180.
//
// Any cookies accessed more recently than kSafeFromGlobalPurgeDays will not
// be evicted by global garbage collection, even if we have more than
// kMaxCookies. This does not affect domain garbage collection.
static const size_t kDomainMaxCookies;
static const size_t kDomainPurgeCookies;
static const size_t kMaxCookies;
static const size_t kPurgeCookies;
// chromium/src/net/cookies/cookie_monster.cc
// 如果自定义Cookie限制的话,修改这里就好了。
const size_t CookieMonster::kDomainMaxCookies = 180;
const size_t CookieMonster::kDomainPurgeCookies = 30;
const size_t CookieMonster::kMaxCookies = 3300;
const size_t CookieMonster::kPurgeCookies = 300;